3
0
Fork 0
forked from mirrors/nixpkgs

perlPackages.XMLParser: fix cross-compilation

This commit is contained in:
volth 2018-10-11 22:46:55 +00:00 committed by volth
parent 36834a0495
commit 201d3ef704

View file

@ -17600,9 +17600,11 @@ let
url = mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz; url = mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz;
sha256 = "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s"; sha256 = "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s";
}; };
patchPhase = if stdenv.isCygwin then '' patchPhase = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace Expat/Makefile.PL --replace 'use English;' '#'
'' + stdenv.lib.optionalString stdenv.isCygwin ''
sed -i"" -e "s@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. \$Config{_exe};@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. (\$^O eq 'cygwin' ? \"\" : \$Config{_exe});@" inc/Devel/CheckLib.pm sed -i"" -e "s@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. \$Config{_exe};@my \$compiler = File::Spec->catfile(\$path, \$cc\[0\]) \. (\$^O eq 'cygwin' ? \"\" : \$Config{_exe});@" inc/Devel/CheckLib.pm
'' else null; '';
makeMakerFlags = "EXPATLIBPATH=${pkgs.expat.out}/lib EXPATINCPATH=${pkgs.expat.dev}/include"; makeMakerFlags = "EXPATLIBPATH=${pkgs.expat.out}/lib EXPATINCPATH=${pkgs.expat.dev}/include";
propagatedBuildInputs = [ LWP ]; propagatedBuildInputs = [ LWP ];
}; };