summary refs log tree commit diff
path: root/pkgs/os-specific/linux/busybox
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-10-12 08:31:19 +0200
committerVladimír Čunát <v@cunat.cz>2019-10-12 08:52:07 +0200
commitd0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e (patch)
tree99277ed1669ff24028687dc579eb6040f111d3ed /pkgs/os-specific/linux/busybox
parent632f69857d0a0bdaad7b1b77c85ce9050289f428 (diff)
downloadnixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar.gz
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar.bz2
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar.lz
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar.xz
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.tar.zst
nixpkgs-d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e.zip
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
Diffstat (limited to 'pkgs/os-specific/linux/busybox')
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix
index 087209a9d29..40b44514f1b 100644
--- a/pkgs/os-specific/linux/busybox/default.nix
+++ b/pkgs/os-specific/linux/busybox/default.nix
@@ -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 ];