diff --git a/pkgs/os-specific/linux/busybox/sandbox-shell.nix b/pkgs/os-specific/linux/busybox/sandbox-shell.nix index fa70e5f91d80c..e7e1e05efa460 100644 --- a/pkgs/os-specific/linux/busybox/sandbox-shell.nix +++ b/pkgs/os-specific/linux/busybox/sandbox-shell.nix @@ -1,9 +1,12 @@ -{ busybox}: +{ lib, stdenv, busybox, musl }: # Minimal shell for use as basic /bin/sh in sandbox builds busybox.override { enableStatic = true; enableMinimal = true; + + useMusl = stdenv.hostPlatform.isGnu && lib.meta.availableOn stdenv.hostPlatform musl; + extraConfig = '' CONFIG_FEATURE_FANCY_ECHO y CONFIG_FEATURE_SH_MATH y diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 052b25933e84c..7f0a2990fde4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12328,12 +12328,7 @@ with pkgs; overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx else stdenv; }; - busybox-sandbox-shell = callPackage ../os-specific/linux/busybox/sandbox-shell.nix { - # musl roadmap has RISC-V support projected for 1.1.20 - busybox = if !stdenv.hostPlatform.isRiscV && !stdenv.hostPlatform.isLoongArch64 && stdenv.hostPlatform.libc != "bionic" - then pkgsStatic.busybox - else busybox; - }; + busybox-sandbox-shell = callPackage ../os-specific/linux/busybox/sandbox-shell.nix { }; cm-rgb = python3Packages.callPackage ../tools/system/cm-rgb { };