2004-04-06 04:18:51 -04:00
|
|
|
#! @shell@ -e
|
2003-07-18 03:42:57 -04:00
|
|
|
|
|
|
|
echo "packing $path into $out..."
|
2005-03-15 07:03:15 -05:00
|
|
|
@coreutils@/mkdir $out
|
2005-03-14 10:09:53 -05:00
|
|
|
dst=$out/tmp.nar.bz2
|
2004-12-13 11:56:18 -05:00
|
|
|
@bindir@/nix-store --dump "$path" > tmp
|
2003-07-18 03:42:57 -04:00
|
|
|
|
2004-12-13 11:56:18 -05:00
|
|
|
@bzip2@ < tmp > $dst
|
2004-11-08 06:32:10 -05:00
|
|
|
|
2005-03-15 06:12:48 -05:00
|
|
|
@bindir@/nix-hash -vvvvv --flat --type $hashAlgo --base32 tmp > $out/nar-hash
|
2004-12-13 11:56:18 -05:00
|
|
|
|
2005-03-15 06:12:48 -05:00
|
|
|
@bindir@/nix-hash --flat --type $hashAlgo --base32 $dst > $out/narbz2-hash
|
2005-03-14 10:09:53 -05:00
|
|
|
|
2005-03-15 07:03:15 -05:00
|
|
|
@coreutils@/mv $out/tmp.nar.bz2 $out/$(@coreutils@/cat $out/narbz2-hash).nar.bz2
|