summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-02-28 12:00:03 -0500
committerShea Levy <shea@shealevy.com>2018-02-28 15:01:32 -0500
commit306d5cdf03ad6375861a20b8885ef38699ca3c23 (patch)
treee117b9fbf1c63aa95a92efd8e47204d694527cf0 /doc
parent8e6520540e6ab0ce5d265cf4bcf68bf8e4ec64a5 (diff)
downloadnixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar
nixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.gz
nixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.bz2
nixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.lz
nixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.xz
nixpkgs-306d5cdf03ad6375861a20b8885ef38699ca3c23.tar.zst
nixpkgs-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 'doc')
-rw-r--r--doc/languages-frameworks/perl.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/languages-frameworks/perl.xml b/doc/languages-frameworks/perl.xml
index dfb463b9991..7f219b8b09d 100644
--- a/doc/languages-frameworks/perl.xml
+++ b/doc/languages-frameworks/perl.xml
@@ -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>