nixpkgs/pkgs/build-support/expand-response-params/default.nix
John Ericson 287fce6402 expand-response-params: Pull out of cc-wrapper
No hashes were changed
2017-08-25 11:21:09 -04:00

14 lines
454 B
Nix

{ 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"}
'';
}