forked from mirrors/nixpkgs
cpupower: enable cross compilation
This commit is contained in:
parent
259b9ff6b0
commit
84f54b898a
|
@ -1,22 +1,21 @@
|
|||
{ stdenv, fetchurl, kernel, coreutils, pciutils, gettext }:
|
||||
{ stdenv, buildPackages, fetchurl, kernel, pciutils, gettext }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "cpupower-${kernel.version}";
|
||||
|
||||
src = kernel.src;
|
||||
|
||||
buildInputs = [ coreutils pciutils gettext ];
|
||||
nativeBuildInputs = [ gettext ];
|
||||
buildInputs = [ pciutils ];
|
||||
|
||||
configurePhase = ''
|
||||
cd tools/power/cpupower
|
||||
sed -i 's,/bin/true,${coreutils}/bin/true,' Makefile
|
||||
sed -i 's,/bin/pwd,${coreutils}/bin/pwd,' Makefile
|
||||
sed -i 's,/usr/bin/install,${coreutils}/bin/install,' Makefile
|
||||
sed -i 's,/bin/true,${buildPackages.coreutils}/bin/true,' Makefile
|
||||
sed -i 's,/bin/pwd,${buildPackages.coreutils}/bin/pwd,' Makefile
|
||||
sed -i 's,/usr/bin/install,${buildPackages.coreutils}/bin/install,' Makefile
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
'';
|
||||
makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" ];
|
||||
|
||||
installPhase = ''
|
||||
make \
|
||||
|
|
Loading…
Reference in a new issue