diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index efd3515ff240..2dcdcdc4a91d 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -23,10 +23,13 @@ stdenv.mkDerivation { # perf refers both to newt and slang # binutils is required for libbfd. nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt flex bison ]; - buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils ] ++ + buildInputs = [ python perl newt slang pkgconfig libunwind binutils ] ++ stdenv.lib.optional withGtk gtk; - NIX_CFLAGS_COMPILE = "-Wno-error=cpp"; + # Note: we don't add elfutils to buildInputs, since it provides a + # bad `ld' and other stuff. + NIX_CFLAGS_COMPILE = "-I${elfutils}/include -Wno-error=cpp"; + NIX_CFLAGS_LINK = "-L${elfutils}/lib"; installFlags = "install install-man ASCIIDOC8=1";