From c26de115510a0921057356a984d466cf19ba80f6 Mon Sep 17 00:00:00 2001
From: Robin Gloster <mail@glob.in>
Date: Wed, 24 Aug 2016 19:19:02 +0000
Subject: [PATCH] linuxPackages.perf: fix build with new glibc and remove hack

elfutils now adds a eu- prefix to avoid collisions
---
 pkgs/os-specific/linux/kernel/perf.nix | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index d1544cc17f17..4b1120afa4e7 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -25,18 +25,15 @@ stdenv.mkDerivation {
   # binutils is required for libbfd.
   nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
       flex bison libiberty ];
-  buildInputs = [ python perl newt slang pkgconfig libunwind binutils zlib ] ++
+  buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils zlib ] ++
     stdenv.lib.optional withGtk gtk;
 
   # 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 -Wno-error=bool-compare";
-  NIX_CFLAGS_LINK = "-L${elfutils}/lib";
+  NIX_CFLAGS_COMPILE = "-Wno-error=cpp -Wno-error=bool-compare -Wno-error=deprecated-declarations";
 
   installFlags = "install install-man ASCIIDOC8=1";
 
-  inherit elfutils;
-
   crossAttrs = {
     /* I don't want cross-python or cross-perl -
        I don't know if cross-python even works */