{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; rust-overlay = { url = "github:oxalica/rust-overlay"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "utils"; }; }; naersk = { url = "github:nix-community/naersk"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "utils"; }; }; }; outputs = { self, nixpkgs, naersk, rust-overlay, utils }: utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; rust = pkgs.rust-bin.stable.latest.default.override { extensions = [ "rust-src" ]; targets = [ "wasm32-unknown-unknown" "x86_64-unknown-linux-gnu" ]; }; naersk-lib = naersk.lib."${system}".override { cargo = rust; rustc = rust; }; in with pkgs; { defaultPackage = naersk-lib.buildPackage { pname = "conventions"; root = ./.; }; devShell = mkShell { buildInputs = [ rust openssl pkgconfig cmake netcdf git gdb just cargo-watch cargo-asm cargo-outdated cargo-criterion ripgrep jq tree ]; # workaround for https://github.com/NixOS/nixpkgs/blob/48dfc9fa97d762bce28cc8372a2dd3805d14c633/doc/languages-frameworks/python.section.md#python-setuppy-bdist_wheel-cannot-create-whl SOURCE_DATE_EPOCH = 315532800; # 1980 }; }); }