From 6b73c0f198c59dd1e67aac39076c3076517c9d38 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Thu, 13 Apr 2017 01:54:04 -0700 Subject: [PATCH 1/4] netcat-openbsd: pkgconfig is a nativeBuildInput --- pkgs/tools/networking/netcat-openbsd/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/netcat-openbsd/default.nix b/pkgs/tools/networking/netcat-openbsd/default.nix index 9933b512006f..ef539cbb51fd 100644 --- a/pkgs/tools/networking/netcat-openbsd/default.nix +++ b/pkgs/tools/networking/netcat-openbsd/default.nix @@ -15,7 +15,9 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ pkgconfig libbsd ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ libbsd ]; + sourceRoot = name; patches = [ "../debian/patches/*.patch" ]; From bd45ec6416d9560b050cf098c4eccc1051df0900 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Thu, 13 Apr 2017 01:55:29 -0700 Subject: [PATCH 2/4] buildEnv: use buildPackages.perl so crossDrv works --- pkgs/build-support/buildenv/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix index dc05ec1678cb..47e2c1b904c3 100644 --- a/pkgs/build-support/buildenv/default.nix +++ b/pkgs/build-support/buildenv/default.nix @@ -2,7 +2,7 @@ # a fork of the buildEnv in the Nix distribution. Most changes should # eventually be merged back into the Nix distribution. -{ perl, runCommand, lib }: +{ buildPackages, runCommand, lib }: { name @@ -66,6 +66,6 @@ runCommand name passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else null; } '' - ${perl}/bin/perl -w ${./builder.pl} + ${buildPackages.perl}/bin/perl -w ${./builder.pl} eval "$postBuild" '' From 980ced505fd4da90ae75d1582da6825ef51476c1 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Tue, 7 Feb 2017 09:16:29 -0800 Subject: [PATCH 3/4] coreutils: fixing ccCross.libc lookup --- pkgs/tools/misc/coreutils/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 455937f3a67c..d87976cbc5e8 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { ++ optional aclSupport acl.crossDrv ++ optional attrSupport attr.crossDrv ++ optionals selinuxSupport [ libselinux.crossDrv libsepol.crossDrv ] - ++ optional (stdenv.ccCross.libc ? libiconv) + ++ optional (stdenv ? ccCross.libc.libiconv) stdenv.ccCross.libc.libiconv.crossDrv; # Prevents attempts of running 'help2man' on cross-built binaries. From f89504d06746f50d1b7915ad6b31fc58a3449541 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Tue, 7 Feb 2017 09:17:28 -0800 Subject: [PATCH 4/4] kmod: crossDrv should use native xz --- pkgs/os-specific/linux/kmod/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kmod/default.nix b/pkgs/os-specific/linux/kmod/default.nix index 138130fa82e4..5d0dca7b6bec 100644 --- a/pkgs/os-specific/linux/kmod/default.nix +++ b/pkgs/os-specific/linux/kmod/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, autoreconfHook, xz, zlib, pkgconfig, libxslt }: +{ stdenv, buildPackages, lib, fetchurl, autoreconfHook, pkgconfig, libxslt, xz }: let systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ]; @@ -14,13 +14,14 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; - buildInputs = [ xz /* zlib */ ]; + buildInputs = [ xz ]; + # HACK until BUG issue #21191 is addressed + crossAttrs.preUnpack = ''PATH="${buildPackages.xz}/bin''${PATH:+:}$PATH"''; configureFlags = [ "--sysconfdir=/etc" "--with-xz" "--with-modulesdirs=${modulesDirs}" - # "--with-zlib" ]; patches = [ ./module-dir.patch ];