Add perf stage
This commit is contained in:
parent
4f901c1b9c
commit
c3659d316d
30
garlic/stages/perf.nix
Normal file
30
garlic/stages/perf.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
@ -244,6 +244,7 @@ let
|
|||||||
exec = callPackage ./garlic/stages/exec.nix { };
|
exec = callPackage ./garlic/stages/exec.nix { };
|
||||||
extrae = callPackage ./garlic/stages/extrae.nix { };
|
extrae = callPackage ./garlic/stages/extrae.nix { };
|
||||||
valgrind = callPackage ./garlic/stages/valgrind.nix { };
|
valgrind = callPackage ./garlic/stages/valgrind.nix { };
|
||||||
|
perf = callPackage ./garlic/stages/perf.nix { };
|
||||||
isolate = callPackage ./garlic/stages/isolate { };
|
isolate = callPackage ./garlic/stages/isolate { };
|
||||||
runexp = callPackage ./garlic/stages/runexp { };
|
runexp = callPackage ./garlic/stages/runexp { };
|
||||||
trebuchet = callPackage ./garlic/stages/trebuchet.nix { };
|
trebuchet = callPackage ./garlic/stages/trebuchet.nix { };
|
||||||
|
Loading…
Reference in New Issue
Block a user