From faa44ec33bfdea5bf85bde900005e61705e3bd6e Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Fri, 22 Jul 2022 13:18:26 +0200 Subject: [PATCH 1/2] perlPackages.LWP: 6.49 -> 6.67 Moves test dependencies to `checkInputs` to avoid pulling in HTTP::Daemon, which is now a test requirement, if we're cross compiling as HTTP::Daemon doesn't build with perl-cross miniperl. (cherry picked from commit a98d434e5ecd25e6d5fefdf90434fe59ce35aa2d) --- pkgs/top-level/perl-packages.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index c5d4a4950708..fce2bd80d072 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12853,12 +12853,12 @@ let LWP = buildPerlPackage { pname = "libwww-perl"; - version = "6.49"; + version = "6.67"; src = fetchurl { - url = "mirror://cpan/authors/id/O/OA/OALDERS/libwww-perl-6.49.tar.gz"; - sha256 = "19k0cg4j4qz005a4ngy48z4r8dc99dxlpq8kvj7qnk15mvgd1r63"; + url = "mirror://cpan/authors/id/O/OA/OALDERS/libwww-perl-6.67.tar.gz"; + sha256 = "sha256-lu7ECj/QqhvYNBF75eshxDj3MJTYYaGn5XdPCxImtyM="; }; - propagatedBuildInputs = [ FileListing HTMLParser HTTPCookies HTTPDaemon HTTPNegotiate NetHTTP TryTiny WWWRobotRules ]; + propagatedBuildInputs = [ FileListing HTMLParser HTTPCookies HTTPNegotiate NetHTTP TryTiny WWWRobotRules ]; # support cross-compilation by avoiding using `has_module` which does not work in miniperl (it requires B native module) postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace Makefile.PL --replace 'if has_module' 'if 0; #' @@ -12868,7 +12868,7 @@ let description = "The World-Wide Web library for Perl"; license = with licenses; [ artistic1 gpl1Plus ]; }; - buildInputs = [ TestFatal TestNeeds TestRequiresInternet ]; + checkInputs = [ HTTPDaemon TestFatal TestNeeds TestRequiresInternet ]; }; LWPAuthenOAuth = buildPerlPackage { From 875fcd5940f9c2fcef310ef415071cd74631c325 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 23 Jul 2022 02:03:11 +0200 Subject: [PATCH 2/2] [22.05] perlPackages.LWP: keep HTTPDaemon in propagatedBuildInputs LWP was updated and changed to work around a cross compilation regression caused by a HTTPDaemon security update, this caused another regression where derivations expecting LWP to propagate HTTPDaemon failed. This commit keeps HTTPDaemon in propagatedBuildInputs for host builds as some derivations like SOAPLite, Tirex and possibly more expect LWP to propagate it. But not for cross builds since they are not able to build HTTPDaemon. --- pkgs/top-level/perl-packages.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index fce2bd80d072..8e5617344b42 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12858,7 +12858,10 @@ let url = "mirror://cpan/authors/id/O/OA/OALDERS/libwww-perl-6.67.tar.gz"; sha256 = "sha256-lu7ECj/QqhvYNBF75eshxDj3MJTYYaGn5XdPCxImtyM="; }; - propagatedBuildInputs = [ FileListing HTMLParser HTTPCookies HTTPNegotiate NetHTTP TryTiny WWWRobotRules ]; + propagatedBuildInputs = [ FileListing HTMLParser HTTPCookies HTTPNegotiate NetHTTP TryTiny WWWRobotRules ] + # [22.05]: Propagate HTTPDaemon for non-cross builds + # to avoid changing behaviour from version 6.49 + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ HTTPDaemon ]; # support cross-compilation by avoiding using `has_module` which does not work in miniperl (it requires B native module) postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' substituteInPlace Makefile.PL --replace 'if has_module' 'if 0; #'