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:
2026-03-11 15:05:54 +01:00
parent 34238d81c7
commit 54dfaa9dff

View File

@@ -25,7 +25,6 @@ with builtins;
nixStatic,
busyboxStatic ? pkgs.pkgsStatic.busybox,
bwrapStatic ? pkgs.pkgsStatic.bubblewrap,
prootStatic ? pkgs.pkgsStatic.proot,
zstdStatic ? pkgs.pkgsStatic.zstd,
perlBuildBuild ? pkgs.pkgsBuildBuild.perl,
@@ -105,7 +104,6 @@ let
bwrap = packStaticBin "${bwrapStatic}/bin/bwrap";
nixStatic = packStaticBin "${inp.nixStatic}/bin/nix";
proot = packStaticBin "${prootStatic}/bin/proot";
zstd = packStaticBin "${zstdStatic}/bin/zstd";
# 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
# 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.
# Variables/expressions escaped via `\$` will be evaluated at run time
runtimeScript = ''
@@ -128,17 +126,6 @@ let
trap "declare -p > \''${TMPDIR:-/tmp}/np_env" EXIT
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
if [ -n "\$NP_DEBUG" ] && [ "\$NP_DEBUG" -ge 2 ]; then
set -x
@@ -255,7 +242,6 @@ let
# install other binaries
${installBin zstd "zstd"}
${installBin proot "proot"}
${installBin bwrap "bwrap"}
${installBin nixStatic "nix"}
@@ -391,9 +377,6 @@ let
debug "bwrap executable: \$NP_BWRAP"
[ -z "\$NP_NIX" ] && NP_NIX=\$dir/bin/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..."
if [ -z "\$NP_RUNTIME" ]; then
# read last automatic selected runtime from disk
@@ -451,14 +434,8 @@ let
# --bind \$dir/busybox/bin/busybox /bin/sh\\
else
# proot
collectBinds
makeBindArgs -b ":" \$toBind \$sslBind
run="\$NP_PROOT \$PROOT_ARGS\\
-r \$dir/emptyroot\\
-b /dev:/dev\\
-b \$dir/nix:/nix\\
\$binds"
# -b \$dir/busybox/bin/busybox:/bin/sh\\
echo Unsupported runtime: $NP_RUNTIME
exit 1
fi
debug "base command will be: \$run"
@@ -645,7 +622,6 @@ let
zip="${zip}/bin/zip -0"
$zip $out/bin/nix-portable.zip ${bwrap}/bin/bwrap
$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 ${storeTar}/tar
$zip $out/bin/nix-portable.zip ${caBundleZstd}
@@ -669,6 +645,6 @@ let
in
nixPortable.overrideAttrs (prev: {
passthru = (prev.passthru or {}) // {
inherit bwrap proot;
inherit bwrap;
};
})