diff options
Diffstat (limited to 'pkgs/build-support/cc-wrapper/default.nix')
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 525cb07ac32..d5ae64c9c5f 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -74,18 +74,10 @@ let else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" else null; - expand-response-params = if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null" - then buildPackages.stdenv.mkDerivation { - name = "expand-response-params"; - src = ./expand-response-params.c; - buildCommand = '' - # Work around "stdenv-darwin-boot-2 is not allowed to refer to path /nix/store/...-expand-response-params.c" - cp "$src" expand-response-params.c - "$CC" -std=c99 -O3 -o "$out" expand-response-params.c - strip -S $out - ${optionalString hostPlatform.isLinux "patchelf --shrink-rpath $out"} - ''; - } else ""; + expand-response-params = + if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null" + then import ../expand-response-params { inherit (buildPackages) stdenv; } + else ""; in |