Skip to content

Commit

Permalink
perf: remove binutils patch by wrapper
Browse files Browse the repository at this point in the history
starting with linux 4.12 our patch no longer applied. In order to
avoid having to maintain patches for different linux kernels it is
easier to use a wrapper instead.
  • Loading branch information
Mic92 committed Jul 23, 2017
1 parent 11f8524 commit 8875708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
12 changes: 0 additions & 12 deletions pkgs/os-specific/linux/kernel/perf-binutils-path.patch

This file was deleted.

11 changes: 7 additions & 4 deletions pkgs/os-specific/linux/kernel/perf.nix
@@ -1,4 +1,4 @@
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto, makeWrapper
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils
, libiberty, libaudit
, zlib, withGtk ? false, gtk2 ? null }:
Expand All @@ -13,8 +13,6 @@ stdenv.mkDerivation {

inherit (kernel) src;

patches = kernel.patches ++ [ ./perf-binutils-path.patch ];

preConfigure = ''
cd tools/perf
sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
Expand All @@ -26,7 +24,7 @@ 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 libiberty libaudit ];
flex bison libiberty libaudit makeWrapper ];
buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils zlib ] ++
stdenv.lib.optional withGtk gtk2;

Expand All @@ -45,6 +43,11 @@ stdenv.mkDerivation {

installFlags = "install install-man ASCIIDOC8=1";

preFixup = ''
wrapProgram $out/bin/perf \
--prefix PATH : "${binutils}/bin"
'';

crossAttrs = {
/* I don't want cross-python or cross-perl -
I don't know if cross-python even works */
Expand Down

0 comments on commit 8875708

Please sign in to comment.