Skip to content

Commit 8d9c838

Browse files
committedJul 23, 2017
perf: remove binutils patch by wrapper
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. (cherry picked from commit 8875708)
1 parent e982b64 commit 8d9c838

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed
 

‎pkgs/os-specific/linux/kernel/perf-binutils-path.patch

-12
This file was deleted.

‎pkgs/os-specific/linux/kernel/perf.nix

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto
1+
{ lib, stdenv, kernel, elfutils, python, perl, newt, slang, asciidoc, xmlto, makeWrapper
22
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkgconfig, libunwind, binutils
33
, libiberty, libaudit
44
, zlib, withGtk ? false, gtk2 ? null }:
@@ -13,8 +13,6 @@ stdenv.mkDerivation {
1313

1414
inherit (kernel) src;
1515

16-
patches = kernel.patches ++ [ ./perf-binutils-path.patch ];
17-
1816
preConfigure = ''
1917
cd tools/perf
2018
sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
@@ -26,7 +24,7 @@ stdenv.mkDerivation {
2624
# perf refers both to newt and slang
2725
# binutils is required for libbfd.
2826
nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
29-
flex bison libiberty libaudit ];
27+
flex bison libiberty libaudit makeWrapper ];
3028
buildInputs = [ elfutils python perl newt slang pkgconfig libunwind binutils zlib ] ++
3129
stdenv.lib.optional withGtk gtk2;
3230

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

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

46+
preFixup = ''
47+
wrapProgram $out/bin/perf \
48+
--prefix PATH : "${binutils}/bin"
49+
'';
50+
4851
crossAttrs = {
4952
/* I don't want cross-python or cross-perl -
5053
I don't know if cross-python even works */

0 commit comments

Comments
 (0)
Please sign in to comment.