From 9486dda1152d18b502fc31ff1d6aed4eba6f2fe3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 22 Nov 2003 20:39:51 +0000 Subject: * Fix nix-push. --- corepkgs/nar/Makefile.am | 13 +++++++------ corepkgs/nar/nar.fix | 8 -------- corepkgs/nar/nar.nix | 6 ++++++ corepkgs/nar/nar.sh.in | 2 +- corepkgs/nar/unnar.fix | 9 --------- corepkgs/nar/unnar.nix | 7 +++++++ corepkgs/nar/unnar.sh.in | 2 +- 7 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 corepkgs/nar/nar.fix create mode 100644 corepkgs/nar/nar.nix delete mode 100644 corepkgs/nar/unnar.fix create mode 100644 corepkgs/nar/unnar.nix (limited to 'corepkgs') diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am index e369d29c58..3e0aab869d 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 429e7b5497..0000000000 --- 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 0000000000..f288e0ed49 --- /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 c92ef8e25a..8d3fdb51b2 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 cd5079e50a..0000000000 --- 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 0000000000..a18e499b24 --- /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 8a4532af36..3081356497 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 -- cgit 1.4.1