2017-08-23 20:23:30 +00:00
|
|
|
{ stdenv }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "expand-response-params";
|
|
|
|
src = ./expand-response-params.c;
|
2017-08-23 20:39:15 +00:00
|
|
|
# Work around "stdenv-darwin-boot-2 is not allowed to refer to path
|
|
|
|
# /nix/store/...-expand-response-params.c"
|
|
|
|
unpackPhase = ''
|
2017-08-23 20:23:30 +00:00
|
|
|
cp "$src" expand-response-params.c
|
2017-08-23 20:39:15 +00:00
|
|
|
src=$PWD
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
"$CC" -std=c99 -O3 -o "expand-response-params" expand-response-params.c
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $prefix/bin
|
|
|
|
mv expand-response-params $prefix/bin/
|
2017-08-23 20:23:30 +00:00
|
|
|
'';
|
|
|
|
}
|