2017-08-23 22:23:30 +02:00
|
|
|
{ stdenv }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "expand-response-params";
|
|
|
|
src = ./expand-response-params.c;
|
2022-05-21 18:58:22 +02:00
|
|
|
strictDeps = true;
|
2022-05-14 03:13:49 +02:00
|
|
|
enableParallelBuilding = true;
|
2017-08-23 22:39:15 +02:00
|
|
|
# Work around "stdenv-darwin-boot-2 is not allowed to refer to path
|
|
|
|
# /nix/store/...-expand-response-params.c"
|
|
|
|
unpackPhase = ''
|
2017-08-23 22:23:30 +02:00
|
|
|
cp "$src" expand-response-params.c
|
2017-08-23 22:39:15 +02:00
|
|
|
src=$PWD
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
2021-02-09 02:46:47 +01:00
|
|
|
NIX_CC_USE_RESPONSE_FILE=0 "$CC" -std=c99 -O3 -o "expand-response-params" expand-response-params.c
|
2017-08-23 22:39:15 +02:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $prefix/bin
|
|
|
|
mv expand-response-params $prefix/bin/
|
2017-08-23 22:23:30 +02:00
|
|
|
'';
|
|
|
|
}
|