From 40ebc3096e1169f0f3de3398115fed1345978c4f Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 15 Jul 2024 09:43:30 +0300 Subject: [PATCH] linuxPackages_6_10.perf: fix build Revert upstream change that breaks things in a very strange way. See commit being reverted for details. --- pkgs/os-specific/linux/kernel/perf/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index a54e5c04e214..cff4dac83a5e 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , kernel , elfutils , python3 @@ -60,6 +61,23 @@ stdenv.mkDerivation { inherit (kernel) src; + # Fix 6.10.0 holding pkg-config completely wrong. + # Patches from perf-tools-next, should be in 6.11 or hopefully backported. + patches = lib.optionals (lib.versionAtLeast kernel.version "6.10") [ + (fetchpatch { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/patch/?id=0f0e1f44569061e3dc590cd0b8cb74d8fd53706b"; + hash = "sha256-9u/zhbsDgwOr4T4k9td/WJYRuSHIfbtfS+oNx8nbOlM="; + }) + (fetchpatch { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/patch/?id=366e17409f1f17ad872259ce4a4f8a92beb4c4ee"; + hash = "sha256-NZK1u40qvMwWcgkgJPGpEax2eMo9xHrCQxSYYOK0rbo="; + }) + (fetchpatch { + url = "https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/patch/?id=1d302f626c2a23e4fd05bb810eff300e8f2174fd"; + hash = "sha256-KhCmof8LkyTcBBpfMEtolL3m3kmC5rukKzQvufVKCdI="; + }) + ]; + postPatch = '' # Linux scripts patchShebangs scripts