perf: fix build with kernel 6.0

(cherry picked from commit dbf1d73cd1)
This commit is contained in:
K900
2022-10-03 11:50:37 +03:00
committed by Vladimír Čunát
parent d69f348215
commit 9ea7b836dd

View File

@@ -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"