1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

Merge pull request #1702 from vlstill/perf-fix

perf: Allow proceeding in build even if patch fails.
This commit is contained in:
mornfall 2014-02-08 11:32:10 +01:00
commit 24966fff21

View file

@ -4,6 +4,9 @@
assert withGtk -> gtk != null;
let optionalString = stdenv.lib.optionalString;
versionOlder = stdenv.lib.versionOlder;
in
stdenv.mkDerivation {
name = "perf-linux-${kernel.version}";
@ -12,7 +15,7 @@ stdenv.mkDerivation {
preConfigure = ''
cd tools/perf
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
export makeFlags="DESTDIR=$out $makeFlags"
'';