diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-28 12:00:03 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-28 15:01:32 -0500 |
commit | 306d5cdf03ad6375861a20b8885ef38699ca3c23 (patch) | |
tree | e117b9fbf1c63aa95a92efd8e47204d694527cf0 /pkgs/development/perl-modules/generic/default.nix | |
parent | 8e6520540e6ab0ce5d265cf4bcf68bf8e4ec64a5 (diff) | |
download | nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.gz nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.bz2 nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.lz nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.xz nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.zst nixlib-306d5cdf03ad6375861a20b8885ef38699ca3c23.zip |
perlPackages: Add cross-compilation support.
This involved: * Installing miniperl as $dev/bin/perl * Setting miniperl to take INC from lib/perl5/{site_perl/,}cross_perl/${version} as well as lib/perl5/{site_perl/,}/${version}/${runtimeArch}, in that order. miniperl taking from runtimeArch is not really correct, but it works in some pure-perl cases (e.g. Config.pm) and can be overridden with the cross_perl variant. * Installing perl-cross's stubs into $dev/lib/perl5/cross_perl/${version} * Patching MakeMaker.pm to gracefully degrade (very slightly) if B.pm can't be loaded, which it can't in cross-compilation. * Passing the right build-time and runtime perls to Makefile.PL
Diffstat (limited to 'pkgs/development/perl-modules/generic/default.nix')
-rw-r--r-- | pkgs/development/perl-modules/generic/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 9e21a141c728..b33861d83eed 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -1,6 +1,6 @@ perl: -{ buildInputs ? [], name, ... } @ attrs: +{ nativeBuildInputs ? [], name, ... } @ attrs: perl.stdenv.mkDerivation ( { @@ -27,6 +27,7 @@ perl.stdenv.mkDerivation ( { name = "perl-" + name; builder = ./builder.sh; - buildInputs = buildInputs ++ [ perl ]; + nativeBuildInputs = nativeBuildInputs ++ [ (perl.dev or perl) ]; + inherit perl; } ) |