aboutsummaryrefslogtreecommitdiff
path: root/strip-store-paths/default.nix
blob: 473df87e87eb58cf2c2917d84234f17af4be489c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ stdenv, zig }:

stdenv.mkDerivation {
  name = "strip-store-paths";
  nativeBuildInputs = [ zig ];
  src = ./strip-store-paths.zig;
  
  XDG_CACHE_HOME = "Cache";

  unpackPhase = ''
    cp $src strip-store-paths.zig
  '';

  buildPhase = ''
    zig build-exe -OReleaseFast -mcpu=baseline strip-store-paths.zig
  '';

  installPhase = ''
    install -Dm 755 ./strip-store-paths $out/bin/strip-store-paths
  '';
}