diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix new file mode 100644 index 00000000000..4b8583dcc95 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -0,0 +1,21 @@ +{ stdenv, kernel, elfutils }: + +stdenv.mkDerivation { + name = "perf-linux-${kernel.version}"; + + inherit (kernel) src; + + preConfigure = '' + cd tools/perf + export makeFlags="DESTDIR=$out" + ''; + + buildInputs = [ elfutils ]; + + meta = { + homepage = https://perf.wiki.kernel.org/; + description = "Linux tools to profile with performance counters"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 31cf2a4834b..50aa19571be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5821,6 +5821,8 @@ let stdenv = overrideGCC stdenv gcc34; }; + perf = callPackage ../os-specific/linux/kernel/perf.nix { }; + # State Nix snix = callPackage ../tools/package-management/snix {