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
This commit is contained in:
@@ -177,5 +177,18 @@ you need it.</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section xml:id="ssec-perl-cross-compilation"><title>Cross-compiling modules</title>
|
||||
|
||||
<para>Nixpkgs has experimental support for cross-compiling Perl
|
||||
modules. In many cases, it will just work out of the box, even for
|
||||
modules with native extensions. Sometimes, however, the Makefile.PL
|
||||
for a module may (indirectly) import a native module. In that case,
|
||||
you will need to make a stub for that module that will satisfy the
|
||||
Makefile.PL and install it into
|
||||
<filename>lib/perl5/site_perl/cross_perl/${perl.version}</filename>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user