about summary refs log tree commit diff
path: root/corepkgs/nar
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-18T07·42+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-18T07·42+0000
commitab350eafd2c1a98ea98090fdb3bd9b7ae4f7336b (patch)
tree14f812f4094a9bdcced05ea7cfbf5ad5c8dfe519 /corepkgs/nar
parentb3fc38bf6a407f962b83089b2e13cbc90dd53042 (diff)
* Generate nar.sh, fetchurl.sh.
Diffstat (limited to 'corepkgs/nar')
-rw-r--r--corepkgs/nar/Makefile.am10
-rw-r--r--corepkgs/nar/nar.sh5
-rw-r--r--corepkgs/nar/nar.sh.in5
-rw-r--r--corepkgs/nar/unnar.sh4
-rw-r--r--corepkgs/nar/unnar.sh.in4
5 files changed, 19 insertions, 9 deletions
diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am
new file mode 100644
index 000000000000..508eeff7c902
--- /dev/null
+++ b/corepkgs/nar/Makefile.am
@@ -0,0 +1,10 @@
+all-local: nar.sh unnar.sh
+
+install-exec-local:
+	$(INSTALL) -d $(datadir)/fix/nar
+	$(INSTALL_DATA) nar.fix $(datadir)/fix/nar
+	$(INSTALL_DATA) nar.sh $(datadir)/fix/nar
+	$(INSTALL_DATA) unnar.fix $(datadir)/fix/nar
+	$(INSTALL_DATA) unnar.sh $(datadir)/fix/nar
+
+include ../../substitute.mk
diff --git a/corepkgs/nar/nar.sh b/corepkgs/nar/nar.sh
deleted file mode 100644
index a7b6be8aaa0e..000000000000
--- a/corepkgs/nar/nar.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-echo "packing $path into $out..."
-/nix/bin/nix --dump --file "$path" | bzip2 > $out || exit 1
-
diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in
new file mode 100644
index 000000000000..bffbbaf5e1df
--- /dev/null
+++ b/corepkgs/nar/nar.sh.in
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+echo "packing $path into $out..."
+@bindir@/nix --dump --file "$path" | bzip2 > $out || exit 1
+
diff --git a/corepkgs/nar/unnar.sh b/corepkgs/nar/unnar.sh
deleted file mode 100644
index cc21efb2b7dc..000000000000
--- a/corepkgs/nar/unnar.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-
-echo "unpacking $nar to $out..."
-bunzip2 < $nar | /nix/bin/nix --restore "$out" || exit 1
diff --git a/corepkgs/nar/unnar.sh.in b/corepkgs/nar/unnar.sh.in
new file mode 100644
index 000000000000..4b00cb9812ff
--- /dev/null
+++ b/corepkgs/nar/unnar.sh.in
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+echo "unpacking $nar to $out..."
+bunzip2 < $nar | @bindir@/nix --restore "$out" || exit 1