From a26817b215b9df9e44f86282ed0b39005cd5603b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 10 Sep 2017 12:01:40 +0100 Subject: [PATCH] oprofile: fix hardcoded rm/cp paths --- pkgs/development/tools/profiling/oprofile/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/profiling/oprofile/default.nix b/pkgs/development/tools/profiling/oprofile/default.nix index 4c2a7b241b7..ac87870eb59 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, linuxHeaders +{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders, coreutils , libiberty_static, withGUI ? false , qt4 ? null}: # libX11 is needed because the Qt build stuff automatically adds `-lX11'. @@ -12,6 +12,12 @@ stdenv.mkDerivation rec { sha256 = "0zd5ih6gmm1pkqavd9laa93iff7qv5jkbfjznhlyxl5p826gk5gb"; }; + postPatch = '' + substituteInPlace opjitconv/opjitconv.c \ + --replace "/bin/rm" "${coreutils}/bin/rm" \ + --replace "/bin/cp" "${coreutils}/bin/cp" + ''; + buildInputs = [ binutils zlib popt pkgconfig linuxHeaders libiberty_static ] ++ stdenv.lib.optionals withGUI [ qt4 ];