diff --git a/pkgs/nix-portable/default.nix b/pkgs/nix-portable/default.nix index 57b3339b..80d1869f 100644 --- a/pkgs/nix-portable/default.nix +++ b/pkgs/nix-portable/default.nix @@ -16,6 +16,8 @@ with builtins; "openssh" ], + bashInteractive, + busybox, cacert ? pkgs.cacert, compression ? "zstd -19 -T0", @@ -105,6 +107,7 @@ let nixStatic = packStaticBin "${inp.nixStatic}/bin/nix"; proot = packStaticBin "${inp.proot}/bin/proot"; zstd = packStaticBin "${inp.zstd}/bin/zstd"; + bash = packStaticBin "${inp.bashInteractive}/bin/bash"; # the default nix store contents to extract when first used storeTar = maketar ([ cacert nix nixpkgsSrc ] ++ lib.optional (bundledPackage != null) bundledPackage); @@ -253,6 +256,7 @@ let ${installBin proot "proot"} ${installBin bwrap "bwrap"} ${installBin nixStatic "nix"} + ${installBin bash "bash"} # install ssl cert bundle unzip -poj "\$self" ${ lib.removePrefix "/" "${caBundleZstd}"} | \$dir/bin/zstd -d > \$dir/ca-bundle.crt @@ -339,6 +343,7 @@ let toBind="\$toBind \$dir/busybox/bin /bin" # provide /bin/sh via the shipped busybox toBind="\$toBind \$dir/busybox/bin/busybox /bin/sh" + toBind="\$toBind \$dir/bin/bash /bin/bash" # on termux, make sure termux packages still work inside the nix-portable environment if [ -n "\$TERMUX_VERSION" ]; then @@ -634,6 +639,7 @@ let $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 ${bash}/bin/bash $zip $out/bin/nix-portable.zip ${caBundleZstd} # create fingerprint