1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

Merge pull request #24871 from elitak/cross-staging

Various small crossDrv fixes
This commit is contained in:
John Ericson 2017-04-15 01:27:05 -04:00 committed by GitHub
commit 3bff114d95
4 changed files with 10 additions and 7 deletions

View file

@ -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"
''

View file

@ -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 ];

View file

@ -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.

View file

@ -15,7 +15,9 @@ stdenv.mkDerivation rec {
})
];
buildInputs = [ pkgconfig libbsd ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libbsd ];
sourceRoot = name;
patches = [ "../debian/patches/*.patch" ];