From 9ea7b836dd97bb31fb04a3f0d130d76045320c9e Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 3 Oct 2022 11:50:37 +0300 Subject: [PATCH] perf: fix build with kernel 6.0 (cherry picked from commit dbf1d73cd1a17276196afeee169b4cf7834b7a96) --- pkgs/os-specific/linux/kernel/perf.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 0183e9ffa3fd..b78fa4f49927 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, kernel, elfutils, python2, python3, perl, newt, slang, asciidoc, xmlto, makeWrapper +{ lib, stdenv, fetchpatch, kernel, elfutils, python2, python3, python3Packages, perl, newt, slang, asciidoc, xmlto, makeWrapper , docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkg-config, libunwind, binutils-unwrapped , libiberty, audit, libbfd, libopcodes, openssl, systemtap, numactl , zlib @@ -45,7 +45,8 @@ stdenv.mkDerivation { ] ++ lib.optional withGtk gtk2 ++ (if (versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]) ++ lib.optional withZstd zstd - ++ lib.optional withLibcap libcap; + ++ lib.optional withLibcap libcap + ++ lib.optional (lib.versionAtLeast kernel.version "6.0") python3Packages.setuptools; # Note: we don't add elfutils to buildInputs, since it provides a # bad `ld' and other stuff. @@ -57,7 +58,7 @@ stdenv.mkDerivation { ]; postPatch = '' - patchShebangs scripts + patchShebangs scripts tools/perf/pmu-events/jevents.py ''; doCheck = false; # requires "sparse"