-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
46 lines (41 loc) · 1.2 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
inputs.nixpkgs.url = "nixpkgs/release-23.05";
inputs.nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nix-rust-utils.url = "git+https://git.vdx.hu/voidcontext/nix-rust-utils.git?ref=refs/tags/v0.8.1";
inputs.nix-rust-utils.inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-rust-utils.inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
outputs = {
nixpkgs,
flake-utils,
nix-rust-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
nru = nix-rust-utils.mkLib {inherit pkgs;};
commonArgs = {
src = ./.;
buildInputs = pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.libiconv
pkgs.darwin.apple_sdk.frameworks.Security
];
};
crate = nru.mkCrate (commonArgs
// {
doCheck = false;
});
checks = nru.mkChecks (commonArgs
// {
inherit crate;
nextest = true;
});
in {
inherit checks;
packages.default = crate;
devShells.default = nru.mkDevShell {
inputsFrom = [crate];
inherit checks;
};
});
}