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