perlPackages.ModuleBuild: fix cross-compilation
This commit is contained in:
@@ -15405,6 +15405,20 @@ with self; {
|
||||
url = "mirror://cpan/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz";
|
||||
hash = "sha256-fg9MaSwXQMGshOoU1+o9i8eYsvsmwJh3Ip4E9DCytxc=";
|
||||
};
|
||||
postConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
# for unknown reason, the first run of Build fails
|
||||
./Build || true
|
||||
'';
|
||||
postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
# remove version check since miniperl uses a stub of File::Temp, which do not provide a version:
|
||||
# https://github.com/arsv/perl-cross/blob/master/cnf/stub/File/Temp.pm
|
||||
sed -i '/File::Temp/d' \
|
||||
Build.PL
|
||||
|
||||
# fix discover perl function, it can not handle a wrapped perl
|
||||
sed -i "s,\$self->_discover_perl_interpreter,'$(type -p perl)',g" \
|
||||
lib/Module/Build/Base.pm
|
||||
'';
|
||||
meta = {
|
||||
description = "Build and install Perl modules";
|
||||
license = with lib.licenses; [ artistic1 gpl1Plus ];
|
||||
|
||||
Reference in New Issue
Block a user