on master help sign in
Use arx instead of makeself.
commit8be15d73f2bd9be4e4715638c4e5099cd60a754d authorMatthew Bauer <mjbauer95@gmail.com> dateFri 17 Jun 2016, 17:37 (10 years ago) parent36ebf90
5 files changed+36−31
arx.nix+15 default.nix+8−3 makebootstrap.nix+5−6 makeself.nix−14 makedir.nix → maketar.nix+8−8
arx.nixnew file+15
@@ -0,0 +1,15 @@
1+{ stdenv, arx }:
2+
3+{ name
4+, archive
5+, startup
6+}:
7+
8+ stdenv.mkDerivation {
9+ inherit name;
10+ nativeBuildInputs = [ arx ];
11+ buildCommand = ''
12+ ${arx}/bin/arx tmpx ${archive} -o $out -e ${startup}
13+ chmod +x $out
14+ '';
15+ }
default.nix+8−3
@@ -4,12 +4,17 @@ with nixpkgs;
44
55let
66
7− makeself = callPackage ./makeself.nix {};
8− makedir = callPackage ./makedir.nix {};
7+ arx = callPackage ./arx.nix {
8+ inherit (haskellPackages) arx;
9+ };
10+
11+ maketar = callPackage ./maketar.nix {
12+ };
13+
914 nix-installer = callPackage ./nix-installer.nix {};
1015
1116 makebootstrap = callPackage ./makebootstrap.nix {
12− inherit makedir makeself;
17+ inherit arx maketar;
1318 };
1419
1520 nix-user-chroot = callPackage ./nix-user-chroot.nix {};
makebootstrap.nix+5−6
@@ -1,11 +1,10 @@
1−{makeself, makedir}:
1+{ arx, maketar }:
22
33 { name, target, run }:
4− makeself {
4+ arx {
55 inherit name;
6− startup = ".${target}${run}";
7− archive = makedir {
8− name = "${name}-dir";
9− toplevel = target;
6+ startup = "${target}${run}";
7+ archive = maketar {
8+ inherit name target;
109 };
1110 }
makeself.nixdeleted−14
@@ -1,14 +0,0 @@
1−{ stdenv, makeself }:
2−
3−{ name
4−, archive
5−, startup
6−}:
7−
8− stdenv.mkDerivation {
9− inherit name archive startup;
10− nativeBuildInputs = [ makeself ];
11− buildCommand = ''
12− ${makeself}/bin/makeself --xz $archive $out $name $startup
13− '';
14− }
makedir.nix → maketar.nixrenamed+8−8
@@ -1,17 +1,17 @@
11{ stdenv, perl, pathsFromGraph }:
22
3−{ name, toplevel }:
3+{ name, target }:
44
55 stdenv.mkDerivation {
6− inherit toplevel name;
7− exportReferencesGraph = [ "closure" toplevel ];
6+ inherit name;
7+ exportReferencesGraph = [ "closure" target ];
88 nativeBuildInputs = [ perl ];
99 buildCommand = ''
10− mkdir -p $out
1110 storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure)
12− printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure > $out/.reginfo
13− for path in $storePaths; do
14− cp --parents -rp $path $out/
15− done
11+ printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure > .reginfo
12+ tar cvfj $out \
13+ --owner=0 --group=0 --mode=u+rw,uga+r \
14+ --hard-dereference \
15+ .reginfo $storePaths
1616 '';
1717 }