diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 3311de6b9de9..5722603dc1e3 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -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 ];