summary refs log tree commit diff
path: root/pkgs/build-support/expand-response-params/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-23 16:23:30 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-25 11:21:09 -0400
commit287fce6402100c40317233de6b4f749f2b79b0a5 (patch)
tree845fac8eeaba363f5ddd3dcc720a5dd7b61f36de /pkgs/build-support/expand-response-params/default.nix
parent2e7a3902122a269d751e31823c1c6c6b3ffa5c9b (diff)
downloadnixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar.gz
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar.bz2
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar.lz
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar.xz
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.tar.zst
nixpkgs-287fce6402100c40317233de6b4f749f2b79b0a5.zip
expand-response-params: Pull out of cc-wrapper
No hashes were changed
Diffstat (limited to 'pkgs/build-support/expand-response-params/default.nix')
-rw-r--r--pkgs/build-support/expand-response-params/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/build-support/expand-response-params/default.nix b/pkgs/build-support/expand-response-params/default.nix
new file mode 100644
index 00000000000..7afbb727fc3
--- /dev/null
+++ b/pkgs/build-support/expand-response-params/default.nix
@@ -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"}
+  '';
+}