bscpkgs/garlic/stages/perf.nix

31 lines
429 B
Nix
Raw Normal View History

2020-10-16 00:50:34 +08:00
{
stdenv
, perf
, garlicTools
}:
{
nextStage
, perfOptions
}:
with garlicTools;
let
program = stageProgram nextStage;
in
stdenv.mkDerivation {
name = "perf";
phases = [ "installPhase" ];
preferLocalBuild = true;
dontPatchShebangs = true;
installPhase = ''
cat > $out <<EOF
#!/bin/sh
exec ${perf}/bin/perf ${perfOptions} ${program}
EOF
chmod +x $out
'';
}