diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-25 17:08:52 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-25 17:08:52 +0000 |
commit | 066da4ab852ebe4288536149824ea175dc36cad4 (patch) | |
tree | d9258a2d224a0574c0135cd799cb704fc8c25433 /corepkgs/nar | |
parent | c6290e42bc8890e2036013773a98e3551352c91a (diff) |
* Really fix the substitute mechanism, i.e., ensure the closure
invariant by registering references through the manifest.
* Added a test for nix-pull.
Diffstat (limited to 'corepkgs/nar')
-rw-r--r-- | corepkgs/nar/Makefile.am | 6 | ||||
-rw-r--r-- | corepkgs/nar/nar.sh.in | 8 | ||||
-rw-r--r-- | corepkgs/nar/unnar.nix | 7 | ||||
-rw-r--r-- | corepkgs/nar/unnar.sh.in | 4 |
4 files changed, 4 insertions, 21 deletions
diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am index 8fb879ae1..741d7e9b3 100644 --- a/corepkgs/nar/Makefile.am +++ b/corepkgs/nar/Makefile.am @@ -1,13 +1,11 @@ -all-local: nar.sh unnar.sh +all-local: nar.sh install-exec-local: $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/nar $(INSTALL_DATA) nar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar $(INSTALL_PROGRAM) nar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar - $(INSTALL_DATA) unnar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar - $(INSTALL_PROGRAM) unnar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar include ../../substitute.mk -EXTRA_DIST = nar.nix nar.sh.in unnar.nix unnar.sh.in +EXTRA_DIST = nar.nix nar.sh.in diff --git a/corepkgs/nar/nar.sh.in b/corepkgs/nar/nar.sh.in index 11598e6a9..ccf5b9e90 100644 --- a/corepkgs/nar/nar.sh.in +++ b/corepkgs/nar/nar.sh.in @@ -10,10 +10,6 @@ dst=$out/$(basename $path).nar.bz2 @bzip2@ < tmp > $dst -narHash=$(md5sum -b tmp | cut -c1-32) -if test $? != 0; then exit 1; fi -echo $narHash > $out/nar-hash +@bindir@/nix-hash -vvvvv --flat --type sha1 --base32 tmp > $out/nar-hash -narbz2Hash=$(md5sum -b $dst | cut -c1-32) -if test $? != 0; then exit 1; fi -echo $narbz2Hash > $out/narbz2-hash +@bindir@/nix-hash --flat --type sha1 --base32 $dst > $out/narbz2-hash diff --git a/corepkgs/nar/unnar.nix b/corepkgs/nar/unnar.nix deleted file mode 100644 index a18e499b2..000000000 --- a/corepkgs/nar/unnar.nix +++ /dev/null @@ -1,7 +0,0 @@ -{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 deleted file mode 100644 index 6fab350a1..000000000 --- a/corepkgs/nar/unnar.sh.in +++ /dev/null @@ -1,4 +0,0 @@ -#! @shell@ -e - -echo "unpacking $narFile to $out..." -@bunzip2@ < $narFile | @bindir@/nix-store --restore "$out" |