diff options
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch (renamed from pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch) | 0 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf/default.nix (renamed from pkgs/os-specific/linux/kernel/perf.nix) | 14 | ||||
-rw-r--r-- | pkgs/top-level/linux-kernels.nix | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch b/pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch index 5f4f2fc0b4a..5f4f2fc0b4a 100644 --- a/pkgs/os-specific/linux/kernel/5.19-binutils-2.39-support.patch +++ b/pkgs/os-specific/linux/kernel/perf/5.19-binutils-2.39-support.patch diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 199c12b8e24..d481eea7e75 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -7,15 +7,13 @@ , withLibcap ? true, libcap }: -with lib; - stdenv.mkDerivation { pname = "perf-linux"; version = kernel.version; inherit (kernel) src; - patches = optionals (versionAtLeast kernel.version "5.19" && versionOlder kernel.version "5.20") [ + patches = lib.optionals (lib.versionAtLeast kernel.version "5.19" && lib.versionOlder kernel.version "5.20") [ # binutils-2.39 support around init_disassemble_info() # API change. # Will be included in 5.20. @@ -50,12 +48,10 @@ stdenv.mkDerivation { elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl libopcodes python3 perl ] ++ lib.optional withGtk gtk2 - ++ (if (versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]) + ++ (if (lib.versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]) ++ lib.optional withZstd zstd ++ lib.optional withLibcap libcap; - # Note: we don't add elfutils to buildInputs, since it provides a - # bad `ld' and other stuff. NIX_CFLAGS_COMPILE = toString [ "-Wno-error=cpp" "-Wno-error=bool-compare" @@ -79,11 +75,11 @@ stdenv.mkDerivation { --prefix PATH : "${binutils-unwrapped}/bin" ''; - meta = { + meta = with lib; { homepage = "https://perf.wiki.kernel.org/"; description = "Linux tools to profile with performance counters"; - maintainers = with lib.maintainers; [viric]; - platforms = with lib.platforms; linux; + maintainers = with maintainers; [ viric ]; + platforms = platforms.linux; broken = kernel.kernelOlder "5"; }; } diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 7f7c4bb4e9c..bb19710ffd8 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -430,7 +430,7 @@ in { oci-seccomp-bpf-hook = if lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/oci-seccomp-bpf-hook { } else null; - perf = callPackage ../os-specific/linux/kernel/perf.nix { }; + perf = callPackage ../os-specific/linux/kernel/perf { }; phc-intel = if lib.versionAtLeast kernel.version "4.10" then callPackage ../os-specific/linux/phc-intel { } else null; |