-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
40 lines (34 loc) · 891 Bytes
/
default.nix
File metadata and controls
40 lines (34 loc) · 891 Bytes
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
let
pinned = import ./npins;
pkgs = import pinned.nixpkgs { };
inherit (pkgs) lib;
craneLib = import pinned.crane { inherit pkgs; };
patchedLix = pkgs.lixPackageSets.latest.lix.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./lix.patch ];
});
commonArgs = {
src = craneLib.cleanCargoSource ./.;
strictDeps = true;
};
in
craneLib.buildPackage (
commonArgs
// {
nativeBuildInputs = [ pkgs.makeWrapper ];
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
doCheck = false;
postInstall = ''
wrapProgram "$out/bin/fluke" --prefix PATH : ${
lib.escapeShellArg (
lib.makeBinPath [
patchedLix
pkgs.watchman
]
)
}
wrapProgram "$out/bin/fluke-nix-build" --prefix PATH : "$out/bin"
'';
# TODO: rustfmt and clippy
passthru.lix = patchedLix;
}
)