Partially revert "busybox: fix musl builds"

Original commit 5ba8c04ae5 destroyed the meaning
of the *overridable* flag, and incidentally we were
relying on it in channel-critical stuff:
https://hydra.nixos.org/build/102298542
This commit is contained in:
Vladimír Čunát 2019-10-12 08:31:19 +02:00
parent 632f69857d
commit d0ec32c4fd
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -1,6 +1,8 @@
{ stdenv, lib, buildPackages, fetchurl
, enableStatic ? false
, enableMinimal ? false
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
# nix build -f pkgs/top-level/release.nix stdenvBootstrapTools.x86_64-linux.dist
, useMusl ? stdenv.hostPlatform.libc == "musl", musl
, extraConfig ? ""
}:
@ -88,6 +90,10 @@ stdenv.mkDerivation rec {
runHook postConfigure
'';
postConfigure = lib.optionalString (useMusl && stdenv.hostPlatform.libc != "musl") ''
makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}cc -isystem ${musl.dev}/include -B${musl}/lib -L${musl}/lib")
'';
depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = lib.optionals (enableStatic && !useMusl && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static ];