perf: fix build with kernel 6.0

This commit is contained in:
K900 2022-10-03 11:50:37 +03:00 committed by Alyssa Ross
parent 0faffb5531
commit dbf1d73cd1

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchpatch, 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, libbfd_2_38, libopcodes, libopcodes_2_38, openssl, systemtap, numactl
, zlib
@ -53,7 +53,8 @@ stdenv.mkDerivation {
++ lib.optional withGtk gtk2
++ (if (lib.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;
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=cpp"
@ -63,7 +64,7 @@ stdenv.mkDerivation {
];
postPatch = ''
patchShebangs scripts
patchShebangs scripts tools/perf/pmu-events/jevents.py
'';
doCheck = false; # requires "sparse"