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

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

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

  buildPhase = ''
    export HOME=$TMPDIR
    zig build-exe -OReleaseFast strip-store-paths.zig
  '';

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