forked from rarias/bscpkgs
Add extrae and perf stages
This commit is contained in:
26
bsc/garlic/perf.nix
Normal file
26
bsc/garlic/perf.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
stdenv
|
||||
, bash
|
||||
, perf
|
||||
}:
|
||||
|
||||
{
|
||||
app
|
||||
, perfArgs ? "record -a"
|
||||
, program ? "bin/run"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${app.name}-perf";
|
||||
preferLocalBuild = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/run <<EOF
|
||||
#!${bash}/bin/bash
|
||||
|
||||
exec ${perf}/bin/perf ${perfArgs} ${app}/${program}
|
||||
EOF
|
||||
chmod +x $out/bin/run
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user