-
Notifications
You must be signed in to change notification settings - Fork 3
/
crates.nix
42 lines (38 loc) · 832 Bytes
/
crates.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
{inputs, ...}: {
perSystem = {
pkgs,
config,
...
}: let
crateName = "nix-inspect";
workerPackage = pkgs.stdenv.mkDerivation {
name = "worker";
src = ./worker;
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
];
buildInputs = with pkgs; [
boost
nlohmann_json
nixVersions.nix_2_19.dev
];
configurePhase = "meson setup build";
buildPhase = "ninja -C build";
installPhase = ''
mkdir -p $out/bin
cp build/nix-inspect $out/bin/
'';
};
in {
# declare projects
nci.projects."nix-inspect".path = ./.;
# configure crates
nci.crates.${crateName} = {
drvConfig = {
env.WORKER_BINARY_PATH = "${workerPackage}/bin/nix-inspect";
};
};
};
}