expand-response-params: Pull out of cc-wrapper

No hashes were changed
This commit is contained in:
John Ericson
2017-08-25 11:21:09 -04:00
parent 2e7a390212
commit 287fce6402
3 changed files with 17 additions and 12 deletions
@@ -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"}
'';
}