forked from rarias/jungle
Remove proot from nix-portable
The pkgsStatic.proot is broken due to failed dependencies. In upstream nix-portable they have a custom derivation on top o proot gitlab. But since we don't need it, we can remove it safely. Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
This commit is contained in:
@@ -25,7 +25,6 @@ with builtins;
|
|||||||
nixStatic,
|
nixStatic,
|
||||||
busyboxStatic ? pkgs.pkgsStatic.busybox,
|
busyboxStatic ? pkgs.pkgsStatic.busybox,
|
||||||
bwrapStatic ? pkgs.pkgsStatic.bubblewrap,
|
bwrapStatic ? pkgs.pkgsStatic.bubblewrap,
|
||||||
prootStatic ? pkgs.pkgsStatic.proot,
|
|
||||||
zstdStatic ? pkgs.pkgsStatic.zstd,
|
zstdStatic ? pkgs.pkgsStatic.zstd,
|
||||||
|
|
||||||
perlBuildBuild ? pkgs.pkgsBuildBuild.perl,
|
perlBuildBuild ? pkgs.pkgsBuildBuild.perl,
|
||||||
@@ -105,7 +104,6 @@ let
|
|||||||
|
|
||||||
bwrap = packStaticBin "${bwrapStatic}/bin/bwrap";
|
bwrap = packStaticBin "${bwrapStatic}/bin/bwrap";
|
||||||
nixStatic = packStaticBin "${inp.nixStatic}/bin/nix";
|
nixStatic = packStaticBin "${inp.nixStatic}/bin/nix";
|
||||||
proot = packStaticBin "${prootStatic}/bin/proot";
|
|
||||||
zstd = packStaticBin "${zstdStatic}/bin/zstd";
|
zstd = packStaticBin "${zstdStatic}/bin/zstd";
|
||||||
|
|
||||||
# the default nix store contents to extract when first used
|
# the default nix store contents to extract when first used
|
||||||
@@ -113,7 +111,7 @@ let
|
|||||||
|
|
||||||
|
|
||||||
# The runtime script which unpacks the necessary files to $HOME/.nix-portable
|
# The runtime script which unpacks the necessary files to $HOME/.nix-portable
|
||||||
# and then executes nix via proot or bwrap
|
# and then executes nix via bwrap
|
||||||
# Some shell expressions will be evaluated at build time and some at run time.
|
# Some shell expressions will be evaluated at build time and some at run time.
|
||||||
# Variables/expressions escaped via `\$` will be evaluated at run time
|
# Variables/expressions escaped via `\$` will be evaluated at run time
|
||||||
runtimeScript = ''
|
runtimeScript = ''
|
||||||
@@ -128,17 +126,6 @@ let
|
|||||||
trap "declare -p > \''${TMPDIR:-/tmp}/np_env" EXIT
|
trap "declare -p > \''${TMPDIR:-/tmp}/np_env" EXIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# there seem to be less issues with proot when disabling seccomp
|
|
||||||
# though on android it is needed
|
|
||||||
if [ -n "\$TERMUX_VERSION" ]; then
|
|
||||||
unset LD_PRELOAD
|
|
||||||
NP_RUNTIME=\''${NP_RUNTIME:-proot}
|
|
||||||
export PROOT_TMP_DIR="\$TMPDIR/proot"
|
|
||||||
mkdir -p "\$PROOT_TMP_DIR"
|
|
||||||
else
|
|
||||||
export PROOT_NO_SECCOMP=\''${PROOT_NO_SECCOMP:-1}
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
if [ -n "\$NP_DEBUG" ] && [ "\$NP_DEBUG" -ge 2 ]; then
|
if [ -n "\$NP_DEBUG" ] && [ "\$NP_DEBUG" -ge 2 ]; then
|
||||||
set -x
|
set -x
|
||||||
@@ -255,7 +242,6 @@ let
|
|||||||
|
|
||||||
# install other binaries
|
# install other binaries
|
||||||
${installBin zstd "zstd"}
|
${installBin zstd "zstd"}
|
||||||
${installBin proot "proot"}
|
|
||||||
${installBin bwrap "bwrap"}
|
${installBin bwrap "bwrap"}
|
||||||
${installBin nixStatic "nix"}
|
${installBin nixStatic "nix"}
|
||||||
|
|
||||||
@@ -391,9 +377,6 @@ let
|
|||||||
debug "bwrap executable: \$NP_BWRAP"
|
debug "bwrap executable: \$NP_BWRAP"
|
||||||
[ -z "\$NP_NIX" ] && NP_NIX=\$dir/bin/nix
|
[ -z "\$NP_NIX" ] && NP_NIX=\$dir/bin/nix
|
||||||
debug "nix executable: \$NP_NIX"
|
debug "nix executable: \$NP_NIX"
|
||||||
[ -z "\$NP_PROOT" ] && NP_PROOT=\$(PATH="\$PATH_OLD:\$PATH" which proot 2>/dev/null) || true
|
|
||||||
[ -z "\$NP_PROOT" ] && NP_PROOT=\$dir/bin/proot
|
|
||||||
debug "proot executable: \$NP_PROOT"
|
|
||||||
debug "testing all available runtimes..."
|
debug "testing all available runtimes..."
|
||||||
if [ -z "\$NP_RUNTIME" ]; then
|
if [ -z "\$NP_RUNTIME" ]; then
|
||||||
# read last automatic selected runtime from disk
|
# read last automatic selected runtime from disk
|
||||||
@@ -451,14 +434,8 @@ let
|
|||||||
# --bind \$dir/busybox/bin/busybox /bin/sh\\
|
# --bind \$dir/busybox/bin/busybox /bin/sh\\
|
||||||
else
|
else
|
||||||
# proot
|
# proot
|
||||||
collectBinds
|
echo Unsupported runtime: $NP_RUNTIME
|
||||||
makeBindArgs -b ":" \$toBind \$sslBind
|
exit 1
|
||||||
run="\$NP_PROOT \$PROOT_ARGS\\
|
|
||||||
-r \$dir/emptyroot\\
|
|
||||||
-b /dev:/dev\\
|
|
||||||
-b \$dir/nix:/nix\\
|
|
||||||
\$binds"
|
|
||||||
# -b \$dir/busybox/bin/busybox:/bin/sh\\
|
|
||||||
fi
|
fi
|
||||||
debug "base command will be: \$run"
|
debug "base command will be: \$run"
|
||||||
|
|
||||||
@@ -645,7 +622,6 @@ let
|
|||||||
zip="${zip}/bin/zip -0"
|
zip="${zip}/bin/zip -0"
|
||||||
$zip $out/bin/nix-portable.zip ${bwrap}/bin/bwrap
|
$zip $out/bin/nix-portable.zip ${bwrap}/bin/bwrap
|
||||||
$zip $out/bin/nix-portable.zip ${nixStatic}/bin/nix
|
$zip $out/bin/nix-portable.zip ${nixStatic}/bin/nix
|
||||||
$zip $out/bin/nix-portable.zip ${proot}/bin/proot
|
|
||||||
$zip $out/bin/nix-portable.zip ${zstd}/bin/zstd
|
$zip $out/bin/nix-portable.zip ${zstd}/bin/zstd
|
||||||
$zip $out/bin/nix-portable.zip ${storeTar}/tar
|
$zip $out/bin/nix-portable.zip ${storeTar}/tar
|
||||||
$zip $out/bin/nix-portable.zip ${caBundleZstd}
|
$zip $out/bin/nix-portable.zip ${caBundleZstd}
|
||||||
@@ -669,6 +645,6 @@ let
|
|||||||
in
|
in
|
||||||
nixPortable.overrideAttrs (prev: {
|
nixPortable.overrideAttrs (prev: {
|
||||||
passthru = (prev.passthru or {}) // {
|
passthru = (prev.passthru or {}) // {
|
||||||
inherit bwrap proot;
|
inherit bwrap;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user