nixpkgs/pkgs/build-support/expand-response-params/default.nix
Artturin 1d44ac176c treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same
when enableParallelBuildingByDefault is enabled

verified with
`nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
2022-05-25 16:03:14 +03:00

22 lines
575 B
Nix

{ stdenv }:
stdenv.mkDerivation {
name = "expand-response-params";
src = ./expand-response-params.c;
strictDeps = true;
enableParallelBuilding = true;
# Work around "stdenv-darwin-boot-2 is not allowed to refer to path
# /nix/store/...-expand-response-params.c"
unpackPhase = ''
cp "$src" expand-response-params.c
src=$PWD
'';
buildPhase = ''
NIX_CC_USE_RESPONSE_FILE=0 "$CC" -std=c99 -O3 -o "expand-response-params" expand-response-params.c
'';
installPhase = ''
mkdir -p $prefix/bin
mv expand-response-params $prefix/bin/
'';
}