Merge pull request #211074 from Atemu/toybox-darwin-unbreak

toybox: fix Libsystem inconsistency properly

authored by Jörg Thalheim and committed by GitHub f1b0fbca 94897428

+10 -9
+9 -6
pkgs/tools/misc/toybox/default.nix
··· 1 { 2 stdenv, lib, fetchFromGitHub, which, 3 - buildPackages, libxcrypt, libiconv, Libsystem, 4 enableStatic ? stdenv.hostPlatform.isStatic, 5 enableMinimal ? false, 6 extraConfig ? "" 7 }: 8 9 stdenv.mkDerivation rec { 10 pname = "toybox"; ··· 17 sha256 = "sha256-T3qE9xlcEoZOcY52XfYPpN34zzQl6mfcRnyuldnIvCk="; 18 }; 19 20 - depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed for cross 21 buildInputs = [ 22 libxcrypt 23 - ] ++lib.optionals stdenv.isDarwin [ 24 libiconv 25 - Libsystem # This shouldn't be necessary, see https://github.com/NixOS/nixpkgs/issues/210923 26 - ] ++lib.optionals (enableStatic && stdenv.cc.libc ? static) [ 27 stdenv.cc.libc 28 stdenv.cc.libc.static 29 ]; ··· 52 make oldconfig 53 ''; 54 55 - makeFlags = [ "PREFIX=$(out)/bin" ] ++ lib.optional enableStatic "LDFLAGS=--static"; 56 57 installTargets = [ "install_flat" ]; 58
··· 1 { 2 stdenv, lib, fetchFromGitHub, which, 3 + buildPackages, libxcrypt, libiconv, 4 enableStatic ? stdenv.hostPlatform.isStatic, 5 enableMinimal ? false, 6 extraConfig ? "" 7 }: 8 + 9 + let 10 + inherit (lib) optionals; 11 + in 12 13 stdenv.mkDerivation rec { 14 pname = "toybox"; ··· 21 sha256 = "sha256-T3qE9xlcEoZOcY52XfYPpN34zzQl6mfcRnyuldnIvCk="; 22 }; 23 24 + depsBuildBuild = optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc ]; 25 buildInputs = [ 26 libxcrypt 27 + ] ++ optionals stdenv.isDarwin [ 28 libiconv 29 + ] ++ optionals (enableStatic && stdenv.cc.libc ? static) [ 30 stdenv.cc.libc 31 stdenv.cc.libc.static 32 ]; ··· 55 make oldconfig 56 ''; 57 58 + makeFlags = [ "PREFIX=$(out)/bin" ] ++ optionals enableStatic [ "LDFLAGS=--static" ]; 59 60 installTargets = [ "install_flat" ]; 61
+1 -3
pkgs/top-level/all-packages.nix
··· 12454 12455 toxvpn = callPackage ../tools/networking/toxvpn { }; 12456 12457 - toybox = darwin.apple_sdk_11_0.callPackage ../tools/misc/toybox { 12458 - inherit (darwin.apple_sdk_11_0) Libsystem; 12459 - }; 12460 12461 trackma = callPackage ../tools/misc/trackma { }; 12462
··· 12454 12455 toxvpn = callPackage ../tools/networking/toxvpn { }; 12456 12457 + toybox = darwin.apple_sdk_11_0.callPackage ../tools/misc/toybox { }; 12458 12459 trackma = callPackage ../tools/misc/trackma { }; 12460