From 36834a04957af8ce830e7994eb00080bcc5a2f90 Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 11 Oct 2018 22:45:44 +0000 Subject: [PATCH] perlPackages.LWP: fix cross-compilation --- pkgs/top-level/perl-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index ff7d672da36..0034db8864c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -8854,6 +8854,10 @@ let sha256 = "dda2578d7b32152c4afce834761a61d117de286c705a9f7972c7ac6032ca5953"; }; propagatedBuildInputs = [ FileListing HTMLParser HTTPCookies HTTPDaemon HTTPNegotiate NetHTTP TryTiny WWWRobotRules ]; + # support cross-compilation by avoiding using `has_module` which does not work in miniperl (it requires B native module) + postPatch = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace Makefile.PL --replace 'if has_module' 'if 0; #' + ''; meta = with stdenv.lib; { description = "The World-Wide Web library for Perl"; license = with licenses; [ artistic1 gpl1Plus ];