Skip to content

testing/nix: depend on busybox.static for a statically linked shell

Sören Tempel requested to merge nmeum/aports:nix-embedded-shell into master

Nix needs the host to provide a statically linked shell for its sandbox. Without such a shell, packages which need a shell to build will fail (e.g. nix build "nixpkgs#newlib). This commit fixes this by using /bin/sh from busybox-static and adding a run-time dependency on busybox-static.

We could also encapsulate the busybox-static binary into the nix binary using the --enable-embedded-sandbox-shell configure option. Furthermore, we could switch to something more lightweight in the future, e.g. a statically linked dash binary.

Merge request reports