expand-response-params: Pull out of cc-wrapper
No hashes were changed
This commit is contained in:
parent
2e7a390212
commit
287fce6402
|
@ -74,18 +74,10 @@ let
|
||||||
else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
|
else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
expand-response-params = if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null"
|
expand-response-params =
|
||||||
then buildPackages.stdenv.mkDerivation {
|
if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null"
|
||||||
name = "expand-response-params";
|
then import ../expand-response-params { inherit (buildPackages) stdenv; }
|
||||||
src = ./expand-response-params.c;
|
else "";
|
||||||
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 "";
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
13
pkgs/build-support/expand-response-params/default.nix
Normal file
13
pkgs/build-support/expand-response-params/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ stdenv }:
|
||||||
|
|
||||||
|
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
|
||||||
|
${stdenv.lib.optionalString stdenv.hostPlatform.isLinux "patchelf --shrink-rpath $out"}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue