Skip to content

Commit b77b8f8

Browse files
committed
nix: disable package fetching
1 parent 80615f3 commit b77b8f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flake.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
dontConfigure = true;
3131
dontInstall = true;
3232
doCheck = true;
33+
NO_COLOR = 1; # prevent escape codes from messing up the `nix log`
34+
PACKAGE_DIR = pkgs.callPackage ./deps.nix { zig = zig; };
3335
buildPhase = ''
34-
mkdir -p .cache
35-
ln -s ${pkgs.callPackage ./deps.nix { zig = zig; }} .cache/p
36-
zig build install --cache-dir $(pwd)/.zig-cache --global-cache-dir $(pwd)/.cache -Dcpu=baseline -Doptimize=ReleaseSafe --prefix $out
36+
zig build install --global-cache-dir $(pwd)/.cache --system $PACKAGE_DIR -Dcpu=baseline -Doptimize=ReleaseSafe --prefix $out
3737
'';
3838
checkPhase = ''
39-
zig build test --cache-dir $(pwd)/.zig-cache --global-cache-dir $(pwd)/.cache -Dcpu=baseline
39+
zig build test --global-cache-dir $(pwd)/.cache --system $PACKAGE_DIR -Dcpu=baseline
4040
'';
4141
};
4242
}

0 commit comments

Comments
 (0)