mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-01 09:57:01 +00:00
Merge pull request #1702 from vlstill/perf-fix
perf: Allow proceeding in build even if patch fails.
This commit is contained in:
commit
24966fff21
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,9 @@
|
||||||
|
|
||||||
assert withGtk -> gtk != null;
|
assert withGtk -> gtk != null;
|
||||||
|
|
||||||
|
let optionalString = stdenv.lib.optionalString;
|
||||||
|
versionOlder = stdenv.lib.versionOlder;
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "perf-linux-${kernel.version}";
|
name = "perf-linux-${kernel.version}";
|
||||||
|
|
||||||
|
@ -12,7 +15,7 @@ stdenv.mkDerivation {
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cd tools/perf
|
cd tools/perf
|
||||||
sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
|
sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
|
||||||
patch -p1 < ${./perf.diff}
|
${optionalString (versionOlder kernel.version "3.13") "patch -p1 < ${./perf.diff}"}
|
||||||
[ -f bash_completion ] && sed -i 's,^have perf,_have perf,' bash_completion
|
[ -f bash_completion ] && sed -i 's,^have perf,_have perf,' bash_completion
|
||||||
export makeFlags="DESTDIR=$out $makeFlags"
|
export makeFlags="DESTDIR=$out $makeFlags"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Reference in a new issue