* Fix nix-push.
This commit is contained in:
parent
ab0bc4999a
commit
9486dda115
9 changed files with 56 additions and 63 deletions
|
@ -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
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
Function(["path"],
|
||||
Package(
|
||||
[ ("name", "nar")
|
||||
, ("build", Relative("nar/nar.sh"))
|
||||
, ("path", Var("path"))
|
||||
]
|
||||
)
|
||||
)
|
6
corepkgs/nar/nar.nix
Normal file
6
corepkgs/nar/nar.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{system, path}: derivation {
|
||||
name = "nar";
|
||||
builder = ./nar.sh;
|
||||
system = system;
|
||||
path = path;
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
Function(["nar", "outPath"],
|
||||
Package(
|
||||
[ ("name", "unnar")
|
||||
, ("outPath", Var("outPath"))
|
||||
, ("build", Relative("nar/unnar.sh"))
|
||||
, ("nar", Var("nar"))
|
||||
]
|
||||
)
|
||||
)
|
7
corepkgs/nar/unnar.nix
Normal file
7
corepkgs/nar/unnar.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{system, narFile, outPath}: derivation {
|
||||
name = "unnar";
|
||||
builder = ./unnar.sh;
|
||||
system = system;
|
||||
narFile = narFile;
|
||||
outPath = outPath;
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue