summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-01-06 16:45:14 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2012-01-06 16:45:14 +0000
commitcae619da08cd663f05d905cbbd3b47f7d56aaa0b (patch)
tree7fab45a402a673e26cd98837df31f9de3f8a4bed /pkgs/os-specific/linux/kernel
parent8c063fdfc77114bb3d34b79033f880005ec46552 (diff)
downloadnixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar.gz
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar.bz2
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar.lz
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar.xz
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.tar.zst
nixpkgs-cae619da08cd663f05d905cbbd3b47f7d56aaa0b.zip
Updating elfutils/perf to cross-build. I tested this for the nanonote.
I add newt, checking that it cross-builds too.

I update perf to have newt support, and now it's also finding python, whatever
that means. I've not tested if 'python' as buildInputs is enough.


svn path=/nixpkgs/trunk/; revision=31353
Diffstat (limited to 'pkgs/os-specific/linux/kernel')
-rw-r--r--pkgs/os-specific/linux/kernel/perf.nix17
1 files changed, 14 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix
index 4b8583dcc95..e45a15150d7 100644
--- a/pkgs/os-specific/linux/kernel/perf.nix
+++ b/pkgs/os-specific/linux/kernel/perf.nix
@@ -1,4 +1,4 @@
-{ stdenv, kernel, elfutils }:
+{ stdenv, kernel, elfutils, python, perl, newt }:
 
 stdenv.mkDerivation {
   name = "perf-linux-${kernel.version}";
@@ -7,10 +7,21 @@ stdenv.mkDerivation {
 
   preConfigure = ''
     cd tools/perf
-    export makeFlags="DESTDIR=$out"
+    sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
+    export makeFlags="DESTDIR=$out $makeFlags"
   '';
 
-  buildInputs = [ elfutils ];
+  buildInputs = [ elfutils python perl newt ];
+
+  inherit elfutils;
+
+  crossAttrs = {
+    /* I don't want cross-python or cross-perl -
+       I don't know if cross-python even works */
+    propagatedBuildInputs = [ elfutils.hostDrv newt.hostDrv ];
+    makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-";
+    elfutils = elfutils.hostDrv;
+  };
 
   meta = {
     homepage = https://perf.wiki.kernel.org/;