mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-09-11 06:55:53 +03:00
Use arx instead of makeself.
This commit is contained in:
parent
36ebf90e18
commit
8be15d73f2
15
arx.nix
Normal file
15
arx.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ stdenv, arx }:
|
||||
|
||||
{ name
|
||||
, archive
|
||||
, startup
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
nativeBuildInputs = [ arx ];
|
||||
buildCommand = ''
|
||||
${arx}/bin/arx tmpx ${archive} -o $out -e ${startup}
|
||||
chmod +x $out
|
||||
'';
|
||||
}
|
11
default.nix
11
default.nix
@ -4,12 +4,17 @@ with nixpkgs;
|
||||
|
||||
let
|
||||
|
||||
makeself = callPackage ./makeself.nix {};
|
||||
makedir = callPackage ./makedir.nix {};
|
||||
arx = callPackage ./arx.nix {
|
||||
inherit (haskellPackages) arx;
|
||||
};
|
||||
|
||||
maketar = callPackage ./maketar.nix {
|
||||
};
|
||||
|
||||
nix-installer = callPackage ./nix-installer.nix {};
|
||||
|
||||
makebootstrap = callPackage ./makebootstrap.nix {
|
||||
inherit makedir makeself;
|
||||
inherit arx maketar;
|
||||
};
|
||||
|
||||
nix-user-chroot = callPackage ./nix-user-chroot.nix {};
|
||||
|
@ -1,11 +1,10 @@
|
||||
{makeself, makedir}:
|
||||
{ arx, maketar }:
|
||||
|
||||
{ name, target, run }:
|
||||
makeself {
|
||||
arx {
|
||||
inherit name;
|
||||
startup = ".${target}${run}";
|
||||
archive = makedir {
|
||||
name = "${name}-dir";
|
||||
toplevel = target;
|
||||
startup = "${target}${run}";
|
||||
archive = maketar {
|
||||
inherit name target;
|
||||
};
|
||||
}
|
||||
|
14
makeself.nix
14
makeself.nix
@ -1,14 +0,0 @@
|
||||
{ stdenv, makeself }:
|
||||
|
||||
{ name
|
||||
, archive
|
||||
, startup
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name archive startup;
|
||||
nativeBuildInputs = [ makeself ];
|
||||
buildCommand = ''
|
||||
${makeself}/bin/makeself --xz $archive $out $name $startup
|
||||
'';
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
{ stdenv, perl, pathsFromGraph }:
|
||||
|
||||
{ name, toplevel }:
|
||||
{ name, target }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit toplevel name;
|
||||
exportReferencesGraph = [ "closure" toplevel ];
|
||||
inherit name;
|
||||
exportReferencesGraph = [ "closure" target ];
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure)
|
||||
printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure > $out/.reginfo
|
||||
for path in $storePaths; do
|
||||
cp --parents -rp $path $out/
|
||||
done
|
||||
printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure > .reginfo
|
||||
tar cvfj $out \
|
||||
--owner=0 --group=0 --mode=u+rw,uga+r \
|
||||
--hard-dereference \
|
||||
.reginfo $storePaths
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user