aboutsummaryrefslogtreecommitdiff
path: root/corepkgs/nar
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-22 20:39:51 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-22 20:39:51 +0000
commit9486dda1152d18b502fc31ff1d6aed4eba6f2fe3 (patch)
treec89d92a5b7a75529656a493969ee4a1c6349e9eb /corepkgs/nar
parentab0bc4999a49efbc8e1c25989662a96e32fa0cc5 (diff)
* Fix nix-push.
Diffstat (limited to 'corepkgs/nar')
-rw-r--r--corepkgs/nar/Makefile.am13
-rw-r--r--corepkgs/nar/nar.fix8
-rw-r--r--corepkgs/nar/nar.nix6
-rw-r--r--corepkgs/nar/nar.sh.in2
-rw-r--r--corepkgs/nar/unnar.fix9
-rw-r--r--corepkgs/nar/unnar.nix7
-rw-r--r--corepkgs/nar/unnar.sh.in2
7 files changed, 22 insertions, 25 deletions
diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am
index e369d29c5..3e0aab869 100644
--- a/corepkgs/nar/Makefile.am
+++ b/corepkgs/nar/Makefile.am
@@ -1,12 +1,13 @@
all-local: nar.sh unnar.sh
install-exec-local:
- $(INSTALL) -d $(datadir)/fix/nar
- $(INSTALL_DATA) nar.fix $(datadir)/fix/nar
- $(INSTALL_PROGRAM) nar.sh $(datadir)/fix/nar
- $(INSTALL_DATA) unnar.fix $(datadir)/fix/nar
- $(INSTALL_PROGRAM) unnar.sh $(datadir)/fix/nar
+ $(INSTALL) -d $(datadir)/nix/corepkgs
+ $(INSTALL) -d $(datadir)/nix/corepkgs/nar
+ $(INSTALL_DATA) nar.nix $(datadir)/nix/corepkgs/nar
+ $(INSTALL_PROGRAM) nar.sh $(datadir)/nix/corepkgs/nar
+ $(INSTALL_DATA) unnar.nix $(datadir)/nix/corepkgs/nar
+ $(INSTALL_PROGRAM) unnar.sh $(datadir)/nix/corepkgs/nar
include ../../substitute.mk
-EXTRA_DIST = nar.fix nar.sh.in unnar.fix unnar.sh.in
+EXTRA_DIST = nar.nix nar.sh.in unnar.nix unnar.sh.in
diff --git a/corepkgs/nar/nar.fix b/corepkgs/nar/nar.fix
deleted file mode 100644
index 429e7b549..000000000
--- a/corepkgs/nar/nar.fix
+++ /dev/null
@@ -1,8 +0,0 @@
-Function(["path"],
- Package(
- [ ("name", "nar")
- , ("build", Relative("nar/nar.sh"))
- , ("path", Var("path"))
- ]
- )
-) \ No newline at end of file
diff --git a/corepkgs/nar/nar.nix b/corepkgs/nar/nar.nix
new file mode 100644
index 000000000..f288e0ed4
--- /dev/null
+++ b/corepkgs/nar/nar.nix
@@ -0,0 +1,6 @@
+{system, path}: derivation {
+ name = "nar";
+ builder = ./nar.sh;
+ system = system;
+ path = path;
+}
diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in
index c92ef8e25..8d3fdb51b 100644
--- a/corepkgs/nar/nar.sh.in
+++ b/corepkgs/nar/nar.sh.in
@@ -5,7 +5,7 @@ export PATH=/bin:/usr/bin
echo "packing $path into $out..."
mkdir $out || exit 1
dst=$out/`basename $path`.nar.bz2
-@bindir@/nix --dump "$path" | bzip2 > $dst || exit 1
+@bindir@/nix-store --dump "$path" | bzip2 > $dst || exit 1
md5=$(md5sum -b $dst | cut -c1-32)
if test $? != 0; then exit 1; fi
diff --git a/corepkgs/nar/unnar.fix b/corepkgs/nar/unnar.fix
deleted file mode 100644
index cd5079e50..000000000
--- a/corepkgs/nar/unnar.fix
+++ /dev/null
@@ -1,9 +0,0 @@
-Function(["nar", "outPath"],
- Package(
- [ ("name", "unnar")
- , ("outPath", Var("outPath"))
- , ("build", Relative("nar/unnar.sh"))
- , ("nar", Var("nar"))
- ]
- )
-) \ No newline at end of file
diff --git a/corepkgs/nar/unnar.nix b/corepkgs/nar/unnar.nix
new file mode 100644
index 000000000..a18e499b2
--- /dev/null
+++ b/corepkgs/nar/unnar.nix
@@ -0,0 +1,7 @@
+{system, narFile, outPath}: derivation {
+ name = "unnar";
+ builder = ./unnar.sh;
+ system = system;
+ narFile = narFile;
+ outPath = outPath;
+}
diff --git a/corepkgs/nar/unnar.sh.in b/corepkgs/nar/unnar.sh.in
index 8a4532af3..308135649 100644
--- a/corepkgs/nar/unnar.sh.in
+++ b/corepkgs/nar/unnar.sh.in
@@ -3,4 +3,4 @@
export PATH=/bin:/usr/bin
echo "unpacking $nar to $out..."
-bunzip2 < $nar | @bindir@/nix --restore "$out" || exit 1
+bunzip2 < $nar | @bindir@/nix-store --restore "$out" || exit 1