From d0ec32c4fd12ac8f91cf6c196cf5a2b46f0d376e Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sat, 12 Oct 2019 08:31:19 +0200 Subject: 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 --- pkgs/os-specific/linux/busybox/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/os-specific/linux/busybox') 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 ]; -- cgit 1.4.1