diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 9e3b1ecc6b5a..0f41f15d9fdb 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation rec { }; depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross - buildInputs = lib.optionals enableStatic [ stdenv.cc.libc stdenv.cc.libc.static ]; + buildInputs = lib.optionals (enableStatic && stdenv.cc.libc ? static) + [ stdenv.cc.libc stdenv.cc.libc.static ]; postPatch = "patchShebangs .";