diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 212452001b8c..800cdbad0972 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, which, - buildPackages, libxcrypt, libiconv, Libsystem, + buildPackages, libxcrypt, libiconv, enableStatic ? stdenv.hostPlatform.isStatic, enableMinimal ? false, extraConfig ? "" @@ -17,12 +17,11 @@ stdenv.mkDerivation rec { sha256 = "sha256-T3qE9xlcEoZOcY52XfYPpN34zzQl6mfcRnyuldnIvCk="; }; - depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross + depsBuildBuild = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ]; # needed for cross buildInputs = [ libxcrypt - ] ++lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ libiconv - Libsystem # This shouldn't be necessary, see https://github.com/NixOS/nixpkgs/issues/210923 ] ++lib.optionals (enableStatic && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98a181e7d1e0..8c14b1b1396e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12452,9 +12452,7 @@ with pkgs; toxvpn = callPackage ../tools/networking/toxvpn { }; - toybox = darwin.apple_sdk_11_0.callPackage ../tools/misc/toybox { - inherit (darwin.apple_sdk_11_0) Libsystem; - }; + toybox = darwin.apple_sdk_11_0.callPackage ../tools/misc/toybox { }; trackma = callPackage ../tools/misc/trackma { };