From 259b9ff6b009807257072d033479aa3690120d73 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 21 Jan 2018 01:03:36 -0500 Subject: [PATCH 1/2] pciutils: enable cross compilation --- pkgs/tools/system/pciutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index 1139c49ddf80..3cd00b3394cf 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ zlib kmod which ]; - makeFlags = "SHARED=yes PREFIX=\${out}"; + makeFlags = [ "SHARED=yes" "PREFIX=\${out}" "STRIP=" "HOST=${stdenv.hostPlatform.system}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; installTargets = "install install-lib"; From 84f54b898aaffb67254628e89803a49e8836ee03 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sun, 21 Jan 2018 01:34:22 -0500 Subject: [PATCH 2/2] cpupower: enable cross compilation --- pkgs/os-specific/linux/cpupower/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/os-specific/linux/cpupower/default.nix b/pkgs/os-specific/linux/cpupower/default.nix index d6d529627e24..7cde965d2153 100644 --- a/pkgs/os-specific/linux/cpupower/default.nix +++ b/pkgs/os-specific/linux/cpupower/default.nix @@ -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 \