Add perf-tools
This commit is contained in:
parent
0ccf34039c
commit
dfc6809215
43
pkgs/os-specific/linux/perf-tools/default.nix
Normal file
43
pkgs/os-specific/linux/perf-tools/default.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{ lib, stdenv, fetchFromGitHub, perl }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "perf-tools-20150130";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "brendangregg";
|
||||||
|
repo = "perf-tools";
|
||||||
|
rev = "85414b01247666c9fefad25a1406c8078011c936";
|
||||||
|
sha256 = "1g15nnndcmxd1k9radcvfpn223pp627vs9wh90yiy73v03g7b8cs";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ perl ];
|
||||||
|
|
||||||
|
patchPhase =
|
||||||
|
''
|
||||||
|
for i in execsnoop iolatency iosnoop kernel/funcslower killsnoop opensnoop; do
|
||||||
|
substituteInPlace $i \
|
||||||
|
--replace /usr/bin/gawk "$(type -p gawk)" \
|
||||||
|
--replace /usr/bin/mawk /no-such-path \
|
||||||
|
--replace /usr/bin/getconf "$(type -p getconf)" \
|
||||||
|
--replace awk=awk "awk=$(type -p gawk)"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf examples deprecated
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase =
|
||||||
|
''
|
||||||
|
d=$out/libexec/perf-tools
|
||||||
|
mkdir -p $d $out/share
|
||||||
|
cp -prvd . $d/
|
||||||
|
ln -s $d/bin $out/bin
|
||||||
|
mv $d/man $out/share/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
homepage = https://github.com/brendangregg/perf-tools;
|
||||||
|
description = "Performance analysis tools based on Linux perf_events (aka perf) and ftrace";
|
||||||
|
maintainers = [ lib.maintainers.eelco ];
|
||||||
|
};
|
||||||
|
}
|
@ -9138,6 +9138,8 @@ let
|
|||||||
config = config.pcmciaUtils.config or null;
|
config = config.pcmciaUtils.config or null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
perf-tools = callPackage ../os-specific/linux/perf-tools { };
|
||||||
|
|
||||||
plymouth = callPackage ../os-specific/linux/plymouth {
|
plymouth = callPackage ../os-specific/linux/plymouth {
|
||||||
automake = automake113x;
|
automake = automake113x;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user