aboutsummaryrefslogtreecommitdiff
path: root/strip-store-paths/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'strip-store-paths/default.nix')
-rw-r--r--strip-store-paths/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/strip-store-paths/default.nix b/strip-store-paths/default.nix
new file mode 100644
index 0000000..40fb546
--- /dev/null
+++ b/strip-store-paths/default.nix
@@ -0,0 +1,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
+ '';
+}