From 6ea8f649e62e00fb1d29c87835a6ab1b125ab9c4 Mon Sep 17 00:00:00 2001 From: Timofei Kushnir Date: Mon, 12 Oct 2015 13:05:04 +0300 Subject: [PATCH 1/3] Create kernel headers dependency to correctly compile 'operf' util. --- pkgs/development/tools/profiling/oprofile/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix index 561fea6ef7b0..4c4d8f87d331 100644 --- a/pkgs/development/tools/profiling/oprofile/default.nix +++ b/pkgs/development/tools/profiling/oprofile/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig +{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxPackages , withGUI ? false , qt4 ? null}: # libX11 is needed because the Qt build stuff automatically adds `-lX11'. @@ -12,10 +12,14 @@ stdenv.mkDerivation rec { sha256 = "0nn4wfvwy4nii25y6lwlrnzx9ah4nz0r93yk7hswiy6wxjs10wc4"; }; - buildInputs = [ binutils zlib popt pkgconfig ] + buildInputs = [ binutils zlib popt pkgconfig linuxPackages.kernelHeaders ] ++ stdenv.lib.optionals withGUI [ qt4 ]; configureFlags = [ + "--build ${stdenv.system}" + "--host ${stdenv.system}" + "--target ${stdenv.system}" + "--with-kernel=${linuxPackages.kernelHeaders}" "--disable-shared" # needed because only the static libbfd is available ] ++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4"; From d7eb1dd8d03a8d44af90aa76742523f022bc0f49 Mon Sep 17 00:00:00 2001 From: Timofei Kushnir Date: Mon, 12 Oct 2015 15:02:01 +0300 Subject: [PATCH 2/3] oprofile: depend on kernel headers to correctly compile 'operf' util. --- pkgs/development/tools/profiling/oprofile/default.nix | 9 +++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix index 4c4d8f87d331..4c49bbbf25b1 100644 --- a/pkgs/development/tools/profiling/oprofile/default.nix +++ b/pkgs/development/tools/profiling/oprofile/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxPackages +{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, kernelHeaders , withGUI ? false , qt4 ? null}: # libX11 is needed because the Qt build stuff automatically adds `-lX11'. @@ -12,14 +12,11 @@ stdenv.mkDerivation rec { sha256 = "0nn4wfvwy4nii25y6lwlrnzx9ah4nz0r93yk7hswiy6wxjs10wc4"; }; - buildInputs = [ binutils zlib popt pkgconfig linuxPackages.kernelHeaders ] + buildInputs = [ binutils zlib popt pkgconfig kernelHeaders ] ++ stdenv.lib.optionals withGUI [ qt4 ]; configureFlags = [ - "--build ${stdenv.system}" - "--host ${stdenv.system}" - "--target ${stdenv.system}" - "--with-kernel=${linuxPackages.kernelHeaders}" + "--with-kernel=${kernelHeaders}" "--disable-shared" # needed because only the static libbfd is available ] ++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d5108658d5a..3f6f9b500088 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5656,7 +5656,9 @@ let openocd = callPackage ../development/tools/misc/openocd { }; - oprofile = callPackage ../development/tools/profiling/oprofile { }; + oprofile = callPackage ../development/tools/profiling/oprofile { + kernelHeaders = linuxHeaders; + }; patchelf = callPackage ../development/tools/misc/patchelf { }; From aefa4a181fbb391e7c237f711bc88f949dc75156 Mon Sep 17 00:00:00 2001 From: Timofei Kushnir Date: Mon, 12 Oct 2015 17:50:13 +0300 Subject: [PATCH 3/3] oprofile: depend on kernel headers to correctly compile 'operf' util. --- pkgs/development/tools/profiling/oprofile/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix index 4c49bbbf25b1..542ff000423a 100644 --- a/pkgs/development/tools/profiling/oprofile/default.nix +++ b/pkgs/development/tools/profiling/oprofile/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, kernelHeaders +{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders , withGUI ? false , qt4 ? null}: # libX11 is needed because the Qt build stuff automatically adds `-lX11'. @@ -12,11 +12,11 @@ stdenv.mkDerivation rec { sha256 = "0nn4wfvwy4nii25y6lwlrnzx9ah4nz0r93yk7hswiy6wxjs10wc4"; }; - buildInputs = [ binutils zlib popt pkgconfig kernelHeaders ] + buildInputs = [ binutils zlib popt pkgconfig linuxHeaders ] ++ stdenv.lib.optionals withGUI [ qt4 ]; configureFlags = [ - "--with-kernel=${kernelHeaders}" + "--with-kernel=${linuxHeaders}" "--disable-shared" # needed because only the static libbfd is available ] ++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f6f9b500088..7d5108658d5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5656,9 +5656,7 @@ let openocd = callPackage ../development/tools/misc/openocd { }; - oprofile = callPackage ../development/tools/profiling/oprofile { - kernelHeaders = linuxHeaders; - }; + oprofile = callPackage ../development/tools/profiling/oprofile { }; patchelf = callPackage ../development/tools/misc/patchelf { };