Merge pull request #34312 from lopsided98/cpupower-pciutils-cross

cpupower, pciutils: enable cross compiling

authored by John Ericson and committed by GitHub de243f24 c1d79509

+8 -9
+7 -8
pkgs/os-specific/linux/cpupower/default.nix
··· 1 - { stdenv, fetchurl, kernel, coreutils, pciutils, gettext }: 1 + { stdenv, buildPackages, fetchurl, kernel, pciutils, gettext }: 2 2 3 3 stdenv.mkDerivation { 4 4 name = "cpupower-${kernel.version}"; 5 5 6 6 src = kernel.src; 7 7 8 - buildInputs = [ coreutils pciutils gettext ]; 8 + nativeBuildInputs = [ gettext ]; 9 + buildInputs = [ pciutils ]; 9 10 10 11 configurePhase = '' 11 12 cd tools/power/cpupower 12 - sed -i 's,/bin/true,${coreutils}/bin/true,' Makefile 13 - sed -i 's,/bin/pwd,${coreutils}/bin/pwd,' Makefile 14 - sed -i 's,/usr/bin/install,${coreutils}/bin/install,' Makefile 13 + sed -i 's,/bin/true,${buildPackages.coreutils}/bin/true,' Makefile 14 + sed -i 's,/bin/pwd,${buildPackages.coreutils}/bin/pwd,' Makefile 15 + sed -i 's,/usr/bin/install,${buildPackages.coreutils}/bin/install,' Makefile 15 16 ''; 16 17 17 - buildPhase = '' 18 - make 19 - ''; 18 + makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" ]; 20 19 21 20 installPhase = '' 22 21 make \
+1 -1
pkgs/tools/system/pciutils/default.nix
··· 11 11 nativeBuildInputs = [ pkgconfig ]; 12 12 buildInputs = [ zlib kmod which ]; 13 13 14 - makeFlags = "SHARED=yes PREFIX=\${out}"; 14 + makeFlags = [ "SHARED=yes" "PREFIX=\${out}" "STRIP=" "HOST=${stdenv.hostPlatform.system}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; 15 15 16 16 installTargets = "install install-lib"; 17 17