summary refs log tree commit diff
path: root/pkgs/development/perl-modules
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:33 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-31 09:59:57 +0000
commit9ff36293d1e428cd7bf03e8d4b03611b6d361c28 (patch)
tree1ab51a42b868c55b83f6ccdb80371b9888739dd9 /pkgs/development/perl-modules
parent1c4fcd0d4b0541e674ee56ace1053e23e562cc80 (diff)
parentddc3c396a51918043bb0faa6f676abd9562be62c (diff)
downloadnixpkgs-archive.tar
nixpkgs-archive.tar.gz
nixpkgs-archive.tar.bz2
nixpkgs-archive.tar.lz
nixpkgs-archive.tar.xz
nixpkgs-archive.tar.zst
nixpkgs-archive.zip
Last good Nixpkgs for Weston+nouveau? archive
I came this commit hash to terwiz[m] on IRC, who is trying to figure out
what the last version of Spectrum that worked on their NUC with Nvidia
graphics is.
Diffstat (limited to 'pkgs/development/perl-modules')
-rw-r--r--pkgs/development/perl-modules/CatalystXScriptServerStarman-fork-arg.patch11
-rw-r--r--pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch11
-rw-r--r--pkgs/development/perl-modules/Device-OUI-1.04-hash.patch11
-rw-r--r--pkgs/development/perl-modules/Google-ProtocolBuffers-multiline-comments.patch12
-rw-r--r--pkgs/development/perl-modules/MNI/default.nix23
-rw-r--r--pkgs/development/perl-modules/MNI/no-stdin.patch13
-rw-r--r--pkgs/development/perl-modules/Mozilla-LDAP/default.nix18
-rw-r--r--pkgs/development/perl-modules/Paranoid-blessed-path.patch23
-rw-r--r--pkgs/development/perl-modules/Percona-Toolkit/default.nix32
-rw-r--r--pkgs/development/perl-modules/Po4a/default.nix37
-rw-r--r--pkgs/development/perl-modules/Socket6-sv_undef.patch18
-rw-r--r--pkgs/development/perl-modules/TextBibTeX-use-lib-on-aarch64.patch11
-rw-r--r--pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix31
-rw-r--r--pkgs/development/perl-modules/alien-sdl.patch30
-rw-r--r--pkgs/development/perl-modules/boost-geometry-utils-fix-oom.patch34
-rw-r--r--pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch37
-rw-r--r--pkgs/development/perl-modules/crypt-openpgp-remove-impure-keygen-tests.patch30
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/filtered-requirements.sh18
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/full-requirements.sh21
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/grab-url.sh19
-rw-r--r--pkgs/development/perl-modules/expression-generator/lib-cache.sh18
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/make-clean-dir.sh5
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/requirements.sh17
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/retrieve-file-link.sh14
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/retrieve-meta-yaml.sh16
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/retrieve-modulepage.sh5
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/source-download-link.sh17
-rw-r--r--pkgs/development/perl-modules/expression-generator/usage.txt10
-rwxr-xr-xpkgs/development/perl-modules/expression-generator/write-nix-expression.sh34
-rw-r--r--pkgs/development/perl-modules/generic/builder.sh36
-rw-r--r--pkgs/development/perl-modules/generic/default.nix60
-rw-r--r--pkgs/development/perl-modules/ham/default.nix42
-rw-r--r--pkgs/development/perl-modules/lwp-protocol-https-cert-file.patch31
-rw-r--r--pkgs/development/perl-modules/maatkit/default.nix43
-rw-r--r--pkgs/development/perl-modules/mhonarc.patch26
-rw-r--r--pkgs/development/perl-modules/mod_perl2-PL_hash_seed.patch13
-rw-r--r--pkgs/development/perl-modules/module-pluggable.patch27
-rw-r--r--pkgs/development/perl-modules/net-amazon-mechanicalturk.patch65
-rw-r--r--pkgs/development/perl-modules/perl-opengl-gl-extensions.txt5
-rw-r--r--pkgs/development/perl-modules/perl-opengl.patch57
-rw-r--r--pkgs/development/perl-modules/strip-nondeterminism/default.nix40
-rw-r--r--pkgs/development/perl-modules/xml-grove-utf8.patch10
-rw-r--r--pkgs/development/perl-modules/xml-parser-0001-HACK-Assumes-Expat-paths-are-good.patch45
43 files changed, 1076 insertions, 0 deletions
diff --git a/pkgs/development/perl-modules/CatalystXScriptServerStarman-fork-arg.patch b/pkgs/development/perl-modules/CatalystXScriptServerStarman-fork-arg.patch
new file mode 100644
index 00000000000..af7dc0db7e5
--- /dev/null
+++ b/pkgs/development/perl-modules/CatalystXScriptServerStarman-fork-arg.patch
@@ -0,0 +1,11 @@
+diff --git a/lib/CatalystX/Script/Server/Starman.pm b/lib/CatalystX/Script/Server/Starman.pm
+index 670bd74..7b3bd2e 100644
+--- a/lib/CatalystX/Script/Server/Starman.pm
++++ b/lib/CatalystX/Script/Server/Starman.pm
+@@ -9,5 +9,5 @@ our $VERSION = '0.02';
+ 
+ extends 'Catalyst::Script::Server';
+ 
+-has '+fork' => ( default => 1, init_arg => undef );
++has '+fork' => ( default => 1 );
+ 
diff --git a/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch
new file mode 100644
index 00000000000..5aafa461d94
--- /dev/null
+++ b/pkgs/development/perl-modules/DBD-SQLite/external-sqlite.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.PL	2016-04-21 15:44:34.000000000 +0200
++++ b/Makefile.PL	2017-10-31 11:04:28.389959946 +0100
+@@ -129,7 +129,7 @@
+ # a system sqlite is also sophisticated enough to have a patching system
+ # that can change the if ( 0 ) to if ( 1 )
+ my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc);
+-if ( 0 ) {
++if ( 1 ) {
+ 	require File::Spec;
+ 	if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
+ 		$sqlite_base =~ /=(.*)/;
diff --git a/pkgs/development/perl-modules/Device-OUI-1.04-hash.patch b/pkgs/development/perl-modules/Device-OUI-1.04-hash.patch
new file mode 100644
index 00000000000..6133ab67475
--- /dev/null
+++ b/pkgs/development/perl-modules/Device-OUI-1.04-hash.patch
@@ -0,0 +1,11 @@
+--- Device-OUI-1.04/lib/Device/OUI.pm.orig	2009-03-07 02:23:17.000000000 +0000
++++ Device-OUI-1.04/lib/Device/OUI.pm	2016-08-09 08:19:00.642799675 +0100
+@@ -54,7 +54,7 @@
+         for my $x ( keys %hash ) {
+             if ( not defined $hash{ $x } ) { $hash{ $x } = '' }
+         }
+-        return $handle->{ $oui } = join( "\0", %hash );
++        return $handle->{ $oui } = join( "\0", map {$_,$hash{$_}} sort keys %hash );
+     } elsif ( my $x = $handle->{ $oui } ) {
+         return { split( "\0", $x ) };
+     }
diff --git a/pkgs/development/perl-modules/Google-ProtocolBuffers-multiline-comments.patch b/pkgs/development/perl-modules/Google-ProtocolBuffers-multiline-comments.patch
new file mode 100644
index 00000000000..6b634d0d242
--- /dev/null
+++ b/pkgs/development/perl-modules/Google-ProtocolBuffers-multiline-comments.patch
@@ -0,0 +1,12 @@
+diff -Naur Google-ProtocolBuffers-0.08-orig/lib/Google/ProtocolBuffers/Compiler.pm Google-ProtocolBuffers-0.08/lib/Google/ProtocolBuffers/Compiler.pm
+--- Google-ProtocolBuffers-0.08-orig/lib/Google/ProtocolBuffers/Compiler.pm	2008-10-23 13:46:01.000000000 -0400
++++ Google-ProtocolBuffers-0.08/lib/Google/ProtocolBuffers/Compiler.pm	2013-01-16 13:52:09.855063997 -0500
+@@ -16,7 +16,7 @@
+ 

+ my $grammar = <<'END_OF_GRAMMAR';

+ 

+-proto       :   <skip: qr!  (?: //.*\n | \s+ )*  !x>

++proto       :   <skip: qr!  (?: //.*?\n | \s+ | /\*.*?\*/\s* )*  !xs>

+                 ## list of top level declarations. 

+                 ## Skip empty declarations and ";".

+                 (message | extend | enum | import | package | option | service | syntax | ";")(s) /\Z/

diff --git a/pkgs/development/perl-modules/MNI/default.nix b/pkgs/development/perl-modules/MNI/default.nix
new file mode 100644
index 00000000000..2ef7b90842e
--- /dev/null
+++ b/pkgs/development/perl-modules/MNI/default.nix
@@ -0,0 +1,23 @@
+{ fetchFromGitHub, buildPerlPackage, lib }:
+
+buildPerlPackage {
+  pname = "MNI-Perllib";
+  version = "2012-04-13";
+
+  src = fetchFromGitHub {
+    owner  = "BIC-MNI";
+    repo   = "mni-perllib";
+    rev    = "b908472b4390180ea5d19a121ac5edad6ed88d83";
+    sha256 = "0vk99pwgbard62k63386r7dpnm3h435jdqywr4xqfq7p04dz6kyb";
+  };
+
+  patches = [ ./no-stdin.patch ];
+
+  doCheck = false;  # TODO: almost all tests fail ... is this a real problem?
+
+  meta = with lib; {
+    homepage = "https://github.com/BIC-MNI/mni-perllib";
+    license = with licenses; [ artistic1 gpl1Plus ];
+    maintainers = with maintainers; [ bcdarwin ];
+  };
+}
diff --git a/pkgs/development/perl-modules/MNI/no-stdin.patch b/pkgs/development/perl-modules/MNI/no-stdin.patch
new file mode 100644
index 00000000000..1e9e791257e
--- /dev/null
+++ b/pkgs/development/perl-modules/MNI/no-stdin.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.PL b/Makefile.PL
+index 9f2039a..12d699c 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -213,7 +213,7 @@ TEXT
+ }  # &MY::postamble
+ 
+ 
+-query_subs;
++#query_subs;
+ 
+ my $f;
+ WriteMakefile 
diff --git a/pkgs/development/perl-modules/Mozilla-LDAP/default.nix b/pkgs/development/perl-modules/Mozilla-LDAP/default.nix
new file mode 100644
index 00000000000..6c3d01a3462
--- /dev/null
+++ b/pkgs/development/perl-modules/Mozilla-LDAP/default.nix
@@ -0,0 +1,18 @@
+{ lib, fetchurl, openldap, buildPerlPackage }:
+
+buildPerlPackage rec {
+  pname = "Mozilla-Ldap";
+  version = "1.5.3";
+  USE_OPENLDAP = 1;
+  LDAPSDKDIR = openldap.dev;
+  LDAPSDKLIBDIR = "${openldap.out}/lib";
+  src = fetchurl {
+    url = "https://ftp.mozilla.org/pub/directory/perldap/releases/${version}/src/perl-mozldap-${version}.tar.gz";
+    sha256 = "0s0albdw0zvg3w37s7is7gddr4mqwicjxxsy400n1p96l7ipnw4x";
+  };
+  meta = {
+    description = "Mozilla's ldap client library";
+    homepage = "https://metacpan.org/release/perldap";
+    license = with lib.licenses; [ mpl20 lgpl21Plus gpl2Plus ];
+  };
+}
diff --git a/pkgs/development/perl-modules/Paranoid-blessed-path.patch b/pkgs/development/perl-modules/Paranoid-blessed-path.patch
new file mode 100644
index 00000000000..5e800250110
--- /dev/null
+++ b/pkgs/development/perl-modules/Paranoid-blessed-path.patch
@@ -0,0 +1,23 @@
+diff -ru Paranoid-2.05/lib/Paranoid.pm /tmp/Paranoid-2.05/lib/Paranoid.pm
+--- Paranoid-2.05/lib/Paranoid.pm	2017-02-06 05:48:57.000000000 -0500
++++ /tmp/Paranoid-2.05/lib/Paranoid.pm	2018-05-10 06:40:35.286313299 -0400
+@@ -61,7 +61,7 @@
+ 
+     my $path = shift;
+ 
+-    $path = '/bin:/usr/bin' unless defined $path;
++    $path = '__BLESSED_PATH__' unless defined $path;
+ 
+     delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
+     $ENV{PATH} = $path;
+Binary files Paranoid-2.05/lib/.Paranoid.pm.swp and /tmp/Paranoid-2.05/lib/.Paranoid.pm.swp differ
+diff -ru Paranoid-2.05/t/01_init_core.t /tmp/Paranoid-2.05/t/01_init_core.t
+--- Paranoid-2.05/t/01_init_core.t	2016-07-12 04:49:33.000000000 -0400
++++ /tmp/Paranoid-2.05/t/01_init_core.t	2018-05-10 06:43:41.323183381 -0400
+@@ -35,5 +35,5 @@
+ ok( psecureEnv('/bin:/sbin'), 'psecureEnv 1' );
+ is( $ENV{PATH}, '/bin:/sbin', 'Validated PATH' );
+ ok( psecureEnv(), 'psecureEnv 2' );
+-is( $ENV{PATH}, '/bin:/usr/bin', 'Validated PATH' );
++is( $ENV{PATH}, '__BLESSED_PATH__', 'Validated PATH' );
+ 
diff --git a/pkgs/development/perl-modules/Percona-Toolkit/default.nix b/pkgs/development/perl-modules/Percona-Toolkit/default.nix
new file mode 100644
index 00000000000..5efac53f837
--- /dev/null
+++ b/pkgs/development/perl-modules/Percona-Toolkit/default.nix
@@ -0,0 +1,32 @@
+{ lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang
+, DBDmysql, DBI, IOSocketSSL, TermReadKey
+}:
+
+buildPerlPackage rec {
+  pname = "Percona-Toolkit";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "percona";
+    repo = "percona-toolkit";
+    rev = "v${version}";
+    sha256 = "084ldpskvlfm32lfss5qqzm5y9b8hf029aa4i5pcnzgb53xaxkqx";
+  };
+
+  outputs = [ "out" ];
+
+  nativeBuildInputs = [ shortenPerlShebang ];
+
+  buildInputs = [ DBDmysql DBI IOSocketSSL TermReadKey ];
+
+  postInstall = ''
+    shortenPerlShebang $(grep -l "/bin/env perl" $out/bin/*)
+  '';
+
+  meta = with lib; {
+    description = "Collection of advanced command-line tools to perform a variety of MySQL and system tasks.";
+    homepage = "https://www.percona.com/software/database-tools/percona-toolkit";
+    license = with licenses; [ gpl2 ];
+    maintainers = with maintainers; [ izorkin ];
+  };
+}
diff --git a/pkgs/development/perl-modules/Po4a/default.nix b/pkgs/development/perl-modules/Po4a/default.nix
new file mode 100644
index 00000000000..c89ec1619c1
--- /dev/null
+++ b/pkgs/development/perl-modules/Po4a/default.nix
@@ -0,0 +1,37 @@
+{ lib, fetchurl, docbook_xsl, docbook_xsl_ns, gettext, libxslt, glibcLocales, docbook_xml_dtd_412, docbook_sgml_dtd_41, texlive, opensp
+, perl, buildPerlPackage, ModuleBuild, TextWrapI18N, LocaleGettext, TermReadKey, SGMLSpm, UnicodeLineBreak, PodParser, YAMLTiny }:
+
+buildPerlPackage rec {
+  pname = "po4a";
+  version = "0.62";
+  src = fetchurl {
+    url = "https://github.com/mquinson/po4a/releases/download/v${version}/po4a-${version}.tar.gz";
+    sha256 = "0eb510a66f59de68cf7a205342036cc9fc08b39334b91f1456421a5f3359e68b";
+  };
+  nativeBuildInputs = [ docbook_xsl docbook_xsl_ns ModuleBuild ];
+  propagatedBuildInputs = [ TextWrapI18N LocaleGettext SGMLSpm UnicodeLineBreak PodParser YAMLTiny ];
+  # TODO: TermReadKey was temporarily removed from propagatedBuildInputs to unfreeze the build
+  buildInputs = [ gettext libxslt glibcLocales docbook_xml_dtd_412 docbook_sgml_dtd_41 texlive.combined.scheme-basic opensp ];
+  LC_ALL = "en_US.UTF-8";
+  SGML_CATALOG_FILES = "${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml";
+  preConfigure = ''
+    touch Makefile.PL
+    export PERL_MB_OPT="--install_base=$out --prefix=$out"
+  '';
+  buildPhase = "perl Build.PL --install_base=$out --install_path=\"lib=$out/${perl.libPrefix}\"; ./Build build";
+  checkPhase = ''
+    export SGML_CATALOG_FILES=${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat
+    ./Build test
+  '';
+  installPhase = ''
+    ./Build install
+    for f in $out/bin/*; do
+      substituteInPlace $f --replace "#! /usr/bin/env perl" "#!${perl}/bin/perl"
+    done
+  '';
+  meta = {
+    homepage = "https://po4a.org/";
+    description = "Tools for helping translation of documentation";
+    license = lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/development/perl-modules/Socket6-sv_undef.patch b/pkgs/development/perl-modules/Socket6-sv_undef.patch
new file mode 100644
index 00000000000..3ed4b61b6d3
--- /dev/null
+++ b/pkgs/development/perl-modules/Socket6-sv_undef.patch
@@ -0,0 +1,18 @@
+diff --git a/Socket6.xs b/Socket6.xs
+index 05c791c..058e9d9 100644
+--- a/Socket6.xs
++++ b/Socket6.xs
+@@ -105,10 +105,6 @@ const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
+ #define	HAVE_INET_PTON		1
+ #endif
+ 
+-#ifndef HAVE_PL_SV_UNDEF
+-#define	PL_sv_undef		sv_undef
+-#endif
+-
+ static int
+ not_here(char *s)
+ {
+-- 
+2.16.3
+
diff --git a/pkgs/development/perl-modules/TextBibTeX-use-lib-on-aarch64.patch b/pkgs/development/perl-modules/TextBibTeX-use-lib-on-aarch64.patch
new file mode 100644
index 00000000000..42fa3728680
--- /dev/null
+++ b/pkgs/development/perl-modules/TextBibTeX-use-lib-on-aarch64.patch
@@ -0,0 +1,11 @@
+--- a/Build.PL
++++ b/Build.PL
+@@ -88,7 +88,7 @@ if ( $^O =~ /mswin32/i ) {
+     }
+ }
+ else {
+-    if ( $Config{archname} =~ /^x86_64|^ppc64|^s390x|^aarch64|^riscv64/ ) {
++    if ( $Config{archname} =~ /^x86_64|^ppc64|^s390x|^riscv64/ ) {
+         $libdir =~ s/\bbin\b/lib64/;
+         if ( !-d $libdir ) {
+             my $test = $libdir;
diff --git a/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix b/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix
new file mode 100644
index 00000000000..17ec8ab48b5
--- /dev/null
+++ b/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang, LWP, LWPProtocolHttps, DataDump, JSON }:
+
+buildPerlPackage rec {
+  pname = "WWW-YoutubeViewer";
+  version = "3.7.9";
+
+  src = fetchFromGitHub {
+    owner  = "trizen";
+    repo   = "youtube-viewer";
+    rev    = version;
+    sha256 = "16p0sa91h0zpqdpqmy348g6b9qj5f6qrbzrljn157vk00cg6mx18";
+  };
+
+  nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
+  propagatedBuildInputs = [
+    LWP
+    LWPProtocolHttps
+    DataDump
+    JSON
+  ];
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    shortenPerlShebang $out/bin/youtube-viewer
+  '';
+
+  meta = with lib; {
+    description = "A lightweight application for searching and streaming videos from YouTube";
+    homepage = "https://github.com/trizen/youtube-viewer";
+    maintainers = with maintainers; [ woffs ];
+    license = with licenses; [ artistic2 ];
+  };
+}
diff --git a/pkgs/development/perl-modules/alien-sdl.patch b/pkgs/development/perl-modules/alien-sdl.patch
new file mode 100644
index 00000000000..b00f7dcce81
--- /dev/null
+++ b/pkgs/development/perl-modules/alien-sdl.patch
@@ -0,0 +1,30 @@
+diff --git a/inc/My/Builder/Unix.pm b/inc/My/Builder/Unix.pm
+index 15291d5..5c5ab24 100644
+--- a/inc/My/Builder/Unix.pm
++++ b/inc/My/Builder/Unix.pm
+@@ -48,7 +48,7 @@ sub get_additional_libs {
+ 
+ sub can_build_binaries_from_sources {
+   my $self = shift;
+-  return 1; # yes we can
++  return 0; # no we can't
+ }
+ 
+ sub build_binaries {
+diff --git a/t/004_get_header_version.t b/t/004_get_header_version.t
+index d4146ff..27f53ea 100644
+--- a/t/004_get_header_version.t
++++ b/t/004_get_header_version.t
+@@ -1,8 +1,11 @@
+ # t/004_config.t
+ 
+-use Test::More tests => 1;
++use Test::More;
+ use Alien::SDL;
+ 
++Test::More::plan( skip_all => 'NixOS doesn\'t have SDL headers in this location' );
++
++
+ like( Alien::SDL->get_header_version('SDL_version.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_version.h" );
+ #like( Alien::SDL->get_header_version('SDL_net.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_net.h" );
+ #like( Alien::SDL->get_header_version('SDL_image.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_image.h" );
diff --git a/pkgs/development/perl-modules/boost-geometry-utils-fix-oom.patch b/pkgs/development/perl-modules/boost-geometry-utils-fix-oom.patch
new file mode 100644
index 00000000000..cbcce381989
--- /dev/null
+++ b/pkgs/development/perl-modules/boost-geometry-utils-fix-oom.patch
@@ -0,0 +1,34 @@
+From a46f0e41056b48a56c572fe8884d4b5104a8343e Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@debian.org>
+Date: Sun, 29 Jun 2014 21:51:15 +0300
+Subject: [PATCH] multi_linestring2perl: only extend the array if needed
+
+When the size is 0, we end up extending the stack with
+a negative value. As of Perl 5.19.4, more precisely
+ http://perl5.git.perl.org/perl.git/commit/fc16c3924bd6aa054f21ad5445fecf9b7f39dc36
+this ends up allocating memory for 4G-1 elements.
+
+See Dave Mitchell's comments on perl5-porters:
+ Message-ID: <20140522115758.GX15438@iabyn.com>
+ http://marc.info/?l=perl5-porters&m=140075990913228&w=2
+---
+ src/mline2av.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/mline2av.h b/src/mline2av.h
+index e4b3fc2..d7bacee 100644
+--- a/src/mline2av.h
++++ b/src/mline2av.h
+@@ -9,7 +9,8 @@ multi_linestring2perl(pTHX_ const multi_linestring& mls)
+ {
+   AV* av = newAV();
+   const unsigned int size = mls.size();
+-  av_extend(av, size-1);
++  if (size > 0)
++    av_extend(av, size-1);
+ 
+   for (int i = 0; i < size; i++) {
+     AV* lineav = newAV();
+-- 
+2.0.0
+
diff --git a/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
new file mode 100644
index 00000000000..06207a8b733
--- /dev/null
+++ b/pkgs/development/perl-modules/catalyst-plugin-static-simple-etag.patch
@@ -0,0 +1,37 @@
+Send an ETag header, and honour the If-None-Match request header
+
+diff -ru -x '*~' Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm
+--- Catalyst-Plugin-Static-Simple-0.30-orig/lib/Catalyst/Plugin/Static/Simple.pm	2012-05-04 18:49:30.000000000 +0200
++++ Catalyst-Plugin-Static-Simple-0.30/lib/Catalyst/Plugin/Static/Simple.pm	2013-02-25 22:57:18.667150181 +0100
+@@ -187,16 +187,27 @@
+     my $type      = $c->_ext_to_type( $full_path );
+     my $stat      = stat $full_path;
+ 
+-    $c->res->headers->content_type( $type );
+-    $c->res->headers->content_length( $stat->size );
+-    $c->res->headers->last_modified( $stat->mtime );
+     # Tell Firefox & friends its OK to cache, even over SSL:
+-    $c->res->headers->header('Cache-control' => 'public');
++    #$c->res->headers->header('Cache-control' => 'public');
++
++    $c->res->headers->last_modified( $stat->mtime );
+     # Optionally, set a fixed expiry time:
+     if ($config->{expires}) {
+         $c->res->headers->expires(time() + $config->{expires});
+     }
+ 
++    if ($config->{send_etag}) {
++        my $etag = '"' . $stat->mtime . '-' . $stat->ino . '-'. $stat->size . '"';
++        $c->res->headers->header('ETag' => $etag);
++        if (($c->req->header('If-None-Match') // "") eq $etag) {
++            $c->res->status(304);
++            return 1;
++        }
++    }
++
++    $c->res->headers->content_type( $type );
++    $c->res->headers->content_length( $stat->size );
++
+     my $fh = IO::File->new( $full_path, 'r' );
+     if ( defined $fh ) {
+         binmode $fh;
diff --git a/pkgs/development/perl-modules/crypt-openpgp-remove-impure-keygen-tests.patch b/pkgs/development/perl-modules/crypt-openpgp-remove-impure-keygen-tests.patch
new file mode 100644
index 00000000000..70dc0826276
--- /dev/null
+++ b/pkgs/development/perl-modules/crypt-openpgp-remove-impure-keygen-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/t/13-keygen.t b/t/13-keygen.t
+index f430ffb..2050624 100644
+--- a/t/13-keygen.t
++++ b/t/13-keygen.t
+@@ -1,5 +1,5 @@
+ use strict;
+-use Test::More tests => 29;
++use Test::More tests => 25;
+ 
+ use Crypt::OpenPGP;
+ use Crypt::OpenPGP::Message;
+@@ -26,9 +26,6 @@ for my $type ( qw( RSA DSA ) ) {
+     isa_ok $pub->key, 'Crypt::OpenPGP::Certificate';
+     isa_ok $sec->key, 'Crypt::OpenPGP::Certificate';
+ 
+-    is $pub->key->key_id, $sec->key->key_id,
+-        'public key_id matches secret key_id';
+-
+     is $pub->primary_uid, $id, 'primary_uid matches';
+ 
+     is $pub->key->key->size, $bits, 'keysize (in bits) matches for pubkey';
+@@ -47,8 +44,6 @@ for my $type ( qw( RSA DSA ) ) {
+     isa_ok $pieces[1], 'Crypt::OpenPGP::UserID';
+     isa_ok $pieces[2], 'Crypt::OpenPGP::Signature';
+ 
+-    is $pieces[0]->key_id, $sec->key->key_id,
+-        'serialized public key_id matches secret key_id';
+ }
+ 
+ {
diff --git a/pkgs/development/perl-modules/expression-generator/filtered-requirements.sh b/pkgs/development/perl-modules/expression-generator/filtered-requirements.sh
new file mode 100755
index 00000000000..2e3509d68c1
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/filtered-requirements.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+source lib-cache.sh;
+
+print_reqs() {
+    module_name="$1";
+
+    ./requirements.sh "$1"| while read; do
+        if let "$(./source-download-link.sh "${REPLY}" | wc -c)" && [ perl != "$REPLY" ]; then
+            echo "$REPLY";
+        fi;
+    done;
+}
+
+module_name="$1";
+module_basename="${module_name//::/-}";
+
+cached_output print_reqs "$module_basename" "$module_name" "pure.deps";
diff --git a/pkgs/development/perl-modules/expression-generator/full-requirements.sh b/pkgs/development/perl-modules/expression-generator/full-requirements.sh
new file mode 100755
index 00000000000..91218f36f60
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/full-requirements.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+source lib-cache.sh;
+
+print_requirements () {
+    module_name="$1";
+
+    ./requirements.sh "$module_name" | while read; do
+        echo "$REPLY";
+        print_reqs_cache "$REPLY";
+    done | sort | uniq
+};
+
+print_reqs_cache () {
+    module_name="$1";
+    module_basename="${module_name//::/-}";
+
+    cached_output print_requirements "$module_basename" "$module_name" "full.deps";
+};
+
+print_reqs_cache "$@";
diff --git a/pkgs/development/perl-modules/expression-generator/grab-url.sh b/pkgs/development/perl-modules/expression-generator/grab-url.sh
new file mode 100755
index 00000000000..8935cad8cef
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/grab-url.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+source lib-cache.sh
+
+get_file() {
+    url="$1";
+
+    if [ -n "$url" ]; then
+        curl "$1";
+    else
+        echo -n;
+    fi;
+}
+
+url="$1";
+name="$2";
+name=${name:-$(basename "$url")}
+
+cached_output get_file "${name%%.*}" "$url" "${name#*.}"
diff --git a/pkgs/development/perl-modules/expression-generator/lib-cache.sh b/pkgs/development/perl-modules/expression-generator/lib-cache.sh
new file mode 100644
index 00000000000..65095144bcd
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/lib-cache.sh
@@ -0,0 +1,18 @@
+
+# First argument: command to run
+# Second argument: cache name
+# Third argument: argument to command
+# Fourth argument: cache type
+cached_output () {
+    cmd="$1";
+    basename="$2";
+    arg="$3";
+    ext="$4";
+
+    if ! [ -e "cache-${ext//./-}/${basename}.${ext}" ]; then
+        mkdir -p "cache-${ext//./-}";
+        $cmd $arg > "cache-${ext//./-}/${basename}.${ext}";
+    fi;
+
+    cat "cache-${ext//./-}/${basename}.${ext}";
+}
diff --git a/pkgs/development/perl-modules/expression-generator/make-clean-dir.sh b/pkgs/development/perl-modules/expression-generator/make-clean-dir.sh
new file mode 100755
index 00000000000..996cb92e695
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/make-clean-dir.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+rm -rf test;
+mkdir test; 
+for i in *.sh; do ln -s ../$i test; done;
diff --git a/pkgs/development/perl-modules/expression-generator/requirements.sh b/pkgs/development/perl-modules/expression-generator/requirements.sh
new file mode 100755
index 00000000000..19b24c55a8e
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/requirements.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+source lib-cache.sh;
+
+module_name="$1";
+module_basename="${1//::/-}";
+
+print_requirements () {
+    module_name="$1";
+
+    ./retrieve-meta-yaml.sh "$module_name" |
+        sed -re '1,/^requires:/d; /^[a-z]/,$d; s@^\s*@@; s@:\s.*@@';
+    ./retrieve-meta-yaml.sh "$module_name" |
+        sed -re '1,/^build_requires:/d; /^[a-z]/,$d; s@^\s*@@; s@:\s.*@@';
+};
+
+cached_output print_requirements "$module_basename" "$module_name" "direct.deps";
diff --git a/pkgs/development/perl-modules/expression-generator/retrieve-file-link.sh b/pkgs/development/perl-modules/expression-generator/retrieve-file-link.sh
new file mode 100755
index 00000000000..c8ec5df11b7
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/retrieve-file-link.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+module_basename="$1";
+file_name="$2";
+
+version_regexp="${module_basename}(-[0-9.a-z]+){0,1}";
+author_regexp="[A-Z0-9]+";
+
+./retrieve-modulepage.sh "$module_basename" |
+    egrep "[<]a href=\"[a-z0-9/]*/(${author_regexp}/){0,1}${version_regexp}/${file_name}" |
+    sed -re "s@.*href=\"@@; s@\".*@@" |
+    sed -re 's@^/@http://search.cpan.org/@';
+
+echo "$link_line";
diff --git a/pkgs/development/perl-modules/expression-generator/retrieve-meta-yaml.sh b/pkgs/development/perl-modules/expression-generator/retrieve-meta-yaml.sh
new file mode 100755
index 00000000000..3b162ebe693
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/retrieve-meta-yaml.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+source lib-cache.sh;
+
+print_meta_yaml () {
+    module_name="$1";
+    module_basename="${module_name//::/-}";
+
+    ./grab-url.sh "$(./retrieve-file-link.sh "$module_basename" "META.yml")" \
+        "${module_basename}.meta.yml";
+};
+
+module_name="$1";
+module_basename="${module_name//::/-}";
+
+cached_output print_meta_yaml "$module_basename" "$module_name" meta.yaml;
diff --git a/pkgs/development/perl-modules/expression-generator/retrieve-modulepage.sh b/pkgs/development/perl-modules/expression-generator/retrieve-modulepage.sh
new file mode 100755
index 00000000000..866dfa13f94
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/retrieve-modulepage.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+module_basename="$1";
+
+./grab-url.sh "http://search.cpan.org/dist/$module_basename/" "$module_basename".html;
diff --git a/pkgs/development/perl-modules/expression-generator/source-download-link.sh b/pkgs/development/perl-modules/expression-generator/source-download-link.sh
new file mode 100755
index 00000000000..779d131961f
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/source-download-link.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+source lib-cache.sh;
+
+module_name="$1";
+module_basename="${module_name//::/-}";
+
+write_link() {
+    module_basename="$1";
+
+    ./retrieve-modulepage.sh "$module_basename" |
+        grep -A 2 "This Release" |
+        grep href |
+        sed -re 's/.*href="//; s/".*//; s@^/@http://search.cpan.org/@';
+}
+
+cached_output write_link "$module_basename" "$module_basename" src.link;
diff --git a/pkgs/development/perl-modules/expression-generator/usage.txt b/pkgs/development/perl-modules/expression-generator/usage.txt
new file mode 100644
index 00000000000..1aa0737afdb
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/usage.txt
@@ -0,0 +1,10 @@
+/path/to/write-nix-expression.sh Group::Module::Submodule
+
+It will output Nix assignment formatted for placing into 
+all-packages.nix amongst all the perl packages, like perlAlgorithmDiff.
+Actually it will grab distribution unit Group-Module-Submodule via
+search.cpan.org, and make some effort to write correct dependencies.
+If among requirements there are some that have empty META.yml, or if 
+any of requirements acannot be installed by just getting distribution
+unit whose name can be guessed by replacing :: with -, manual editing
+will be needed. 
diff --git a/pkgs/development/perl-modules/expression-generator/write-nix-expression.sh b/pkgs/development/perl-modules/expression-generator/write-nix-expression.sh
new file mode 100755
index 00000000000..9f5cdb9142e
--- /dev/null
+++ b/pkgs/development/perl-modules/expression-generator/write-nix-expression.sh
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+cd $(dirname $0);
+
+source lib-cache.sh;
+
+print_expression () {
+    module_name="$1";
+    module_basename="${module_name//::/-}";
+    module_compressedname="perl${module_name//::/}";
+    sourcelink="$(./source-download-link.sh "${module_name}")";
+    version_name="${sourcelink%.tar.*}";
+    version_name="${version_name##*/}";
+    dependencies="$(./filtered-requirements.sh "$module_name" | sed -e 's/^/perl/; s/:://g' | xargs)";
+    source_hash=$(nix-prefetch-url "$sourcelink" 2>/dev/null);
+
+    cat <<EOF
+
+  ${module_compressedname} = import ../development/perl-modules/generic perl {
+    name = "${version_name}";
+    src = fetchurl {
+      url = ${sourcelink};
+      sha256 = "$source_hash";
+    };
+    propagatedBuildInputs = [${dependencies}];
+  };
+
+EOF
+};
+
+module_name="$1";
+module_basename="${module_name//::/-}";
+
+cached_output print_expression "$module_basename" "$module_name" "nix";
diff --git a/pkgs/development/perl-modules/generic/builder.sh b/pkgs/development/perl-modules/generic/builder.sh
new file mode 100644
index 00000000000..9b42401fc4d
--- /dev/null
+++ b/pkgs/development/perl-modules/generic/builder.sh
@@ -0,0 +1,36 @@
+source $stdenv/setup
+
+PERL5LIB="$PERL5LIB${PERL5LIB:+:}$out/lib/perl5/site_perl"
+
+perlFlags=
+for i in $(IFS=:; echo $PERL5LIB); do
+    perlFlags="$perlFlags -I$i"
+done
+
+oldPreConfigure="$preConfigure"
+preConfigure() {
+
+    eval "$oldPreConfigure"
+
+    find . | while read fn; do
+        if test -f "$fn"; then
+            first=$(dd if="$fn" count=2 bs=1 2> /dev/null)
+            if test "$first" = "#!"; then
+                echo "patching $fn..."
+                sed -i "$fn" -e "s|^#\!\(.*\bperl\b.*\)$|#\!\1$perlFlags|"
+            fi
+        fi
+    done
+
+    perl Makefile.PL PREFIX=$out INSTALLDIRS=site $makeMakerFlags PERL=$(type -P perl) FULLPERL=\"$fullperl/bin/perl\"
+}
+
+if test -n "$perlPreHook"; then
+    eval "$perlPreHook"
+fi
+
+genericBuild
+
+if test -n "$perlPostHook"; then
+    eval "$perlPostHook"
+fi
diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix
new file mode 100644
index 00000000000..6de9685715d
--- /dev/null
+++ b/pkgs/development/perl-modules/generic/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, perl, buildPerl, toPerlModule }:
+
+{ buildInputs ? []
+, nativeBuildInputs ? []
+, outputs ? [ "out" "devdoc" ]
+, src ? null
+
+, doCheck ? true
+, checkTarget ? "test"
+
+# Prevent CPAN downloads.
+, PERL_AUTOINSTALL ? "--skipdeps"
+
+# From http://wiki.cpantesters.org/wiki/CPANAuthorNotes: "allows
+# authors to skip certain tests (or include certain tests) when
+# the results are not being monitored by a human being."
+, AUTOMATED_TESTING ? true
+
+# current directory (".") is removed from @INC in Perl 5.26 but many old libs rely on it
+# https://metacpan.org/pod/release/XSAWYERX/perl-5.26.0/pod/perldelta.pod#Removal-of-the-current-directory-%28%22.%22%29-from-@INC
+, PERL_USE_UNSAFE_INC ? "1"
+
+, ...
+}@attrs:
+
+assert attrs?pname -> attrs?version;
+assert attrs?pname -> !(attrs?name);
+
+lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is deprecated, use `pname' and `version' instead"
+
+(let
+  defaultMeta = {
+    homepage = "https://metacpan.org/release/${lib.getName attrs}"; # TODO: phase-out `attrs.name`
+    platforms = perl.meta.platforms;
+  };
+
+  cleanedAttrs = builtins.removeAttrs attrs [
+    "meta" "builder" "version" "pname" "fullperl"
+    "buildInputs" "nativeBuildInputs" "buildInputs"
+    "PERL_AUTOINSTALL" "AUTOMATED_TESTING" "PERL_USE_UNSAFE_INC"
+    ];
+
+  package = stdenv.mkDerivation ({
+    pname = "perl${perl.version}-${lib.getName attrs}"; # TODO: phase-out `attrs.name`
+    version = lib.getVersion attrs;                     # TODO: phase-out `attrs.name`
+
+    builder = ./builder.sh;
+
+    buildInputs = buildInputs ++ [ perl ];
+    nativeBuildInputs = nativeBuildInputs ++ [ (perl.mini or perl) ];
+
+    fullperl = buildPerl;
+
+    inherit outputs src doCheck checkTarget;
+    inherit PERL_AUTOINSTALL AUTOMATED_TESTING PERL_USE_UNSAFE_INC;
+
+    meta = defaultMeta // (attrs.meta or { });
+  } // cleanedAttrs);
+
+in toPerlModule package)
diff --git a/pkgs/development/perl-modules/ham/default.nix b/pkgs/development/perl-modules/ham/default.nix
new file mode 100644
index 00000000000..8b19c9404fe
--- /dev/null
+++ b/pkgs/development/perl-modules/ham/default.nix
@@ -0,0 +1,42 @@
+{ lib, buildPerlPackage, fetchFromGitHub, makeWrapper, openssh, GitRepository, URI, XMLMini }:
+
+buildPerlPackage {
+  pname = "ham-unstable";
+  version = "2020-09-09";
+
+  src = fetchFromGitHub {
+    owner = "kernkonzept";
+    repo = "ham";
+    rev = "ae2a326f2efcdae0fa7c5bf0ba205b580fc91ecc";
+    sha256 = "0m65pav2830y0ivwsy60dc4w457qlc0nqg43lji1kj2g96hmy2bw";
+  };
+
+  outputs = [ "out" ];
+
+  nativeBuildInputs = [ makeWrapper ];
+  propagatedBuildInputs = [ openssh GitRepository URI XMLMini ];
+
+  preConfigure = ''
+    patchShebangs .
+    touch Makefile.PL
+    rm -f Makefile
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib $out/bin
+    cp -r . $out/lib/ham
+
+    makeWrapper $out/lib/ham/ham $out/bin/ham --argv0 ham \
+      --prefix PATH : ${openssh}/bin
+  '';
+
+  doCheck = false;
+
+  meta = {
+    description = "A tool to manage big projects consisting of multiple loosely-coupled git repositories";
+    homepage = "https://github.com/kernkonzept/ham";
+    license = "unknown"; # should be gpl2, but not quite sure
+    maintainers = with lib.maintainers; [ aw ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/pkgs/development/perl-modules/lwp-protocol-https-cert-file.patch b/pkgs/development/perl-modules/lwp-protocol-https-cert-file.patch
new file mode 100644
index 00000000000..e9b501c29e2
--- /dev/null
+++ b/pkgs/development/perl-modules/lwp-protocol-https-cert-file.patch
@@ -0,0 +1,31 @@
+From 321401098f2c86a6f68e186cfc06e030b09484b6 Mon Sep 17 00:00:00 2001
+From: Tyson Whitehead <twhitehead@gmail.com>
+Date: Fri, 29 Jun 2018 15:47:00 -0400
+Subject: [PATCH] Respect NIX_SSL_CERT_FILE and SSL_CERT_FILE (in that order)
+
+---
+ lib/LWP/Protocol/https.pm | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/lib/LWP/Protocol/https.pm b/lib/LWP/Protocol/https.pm
+index f7230e2..c78b9ce 100644
+--- a/lib/LWP/Protocol/https.pm
++++ b/lib/LWP/Protocol/https.pm
+@@ -23,6 +23,14 @@ sub _extra_sock_opts
+ 	$ssl_opts{SSL_verify_mode} = 0;
+     }
+     if ($ssl_opts{SSL_verify_mode}) {
++	unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
++	    $ssl_opts{SSL_ca_file} = $ENV{'NIX_SSL_CERT_FILE'}
++                if !defined $ssl_opts{SSL_ca_file};
++	    $ssl_opts{SSL_ca_file} = $ENV{'SSL_CERT_FILE'}
++                if !defined $ssl_opts{SSL_ca_file};
++	    $ssl_opts{SSL_ca_file} = "/etc/ssl/certs/ca-certificates.crt"
++		if !defined $ssl_opts{SSL_ca_file} && -e "/etc/ssl/certs/ca-certificates.crt";
++	}
+ 	unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
+ 	    eval {
+ 		require Mozilla::CA;
+-- 
+2.14.0
+
diff --git a/pkgs/development/perl-modules/maatkit/default.nix b/pkgs/development/perl-modules/maatkit/default.nix
new file mode 100644
index 00000000000..d6945083f63
--- /dev/null
+++ b/pkgs/development/perl-modules/maatkit/default.nix
@@ -0,0 +1,43 @@
+{buildPerlPackage, lib, fetchurl, DBDmysql}:
+
+buildPerlPackage {
+  pname = "maatkit";
+  version = "7540";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/maatkit/maatkit-7540.tar.gz";
+    sha256 = "1a7rxrddkrsfxb2wj01ha91ld0vapfkqcy8j9p08l76zz2l8p2v1";
+  };
+
+  outputs = [ "out" ];
+
+  buildInputs = [ DBDmysql ] ;
+
+  preConfigure = ''
+    find . | while read fn; do
+        if test -f "$fn"; then
+            first=$(dd if="$fn" count=2 bs=1 2> /dev/null)
+            if test "$first" = "#!"; then
+                sed < "$fn" > "$fn".tmp \
+                    -e "s|^#\!\(.*[/\ ]perl.*\)$|#\!$perl/bin/perl $perlFlags|"
+                if test -x "$fn"; then chmod +x "$fn".tmp; fi
+                mv "$fn".tmp "$fn"
+            fi
+        fi
+    done
+  '' ;
+
+  meta = with lib; {
+    description = "Database toolkit";
+    longDescription = ''
+      You can use Maatkit to prove replication is working correctly, fix
+      corrupted data, automate repetitive tasks, speed up your servers, and
+      much more.
+
+      In addition to MySQL, there is support for PostgreSQL, Memcached, and a
+      growing variety of other databases and technologies.
+    '';
+    license = licenses.gpl2Plus;
+    homepage = "http://www.maatkit.org/";
+  };
+}
diff --git a/pkgs/development/perl-modules/mhonarc.patch b/pkgs/development/perl-modules/mhonarc.patch
new file mode 100644
index 00000000000..12b8cc2931b
--- /dev/null
+++ b/pkgs/development/perl-modules/mhonarc.patch
@@ -0,0 +1,26 @@
+diff --git a/lib/mhamain.pl b/lib/mhamain.pl
+index 80980a2..c1259ce 100644
+--- a/lib/mhamain.pl
++++ b/lib/mhamain.pl
+@@ -1562,7 +1562,7 @@ sub signal_catch {
+ ##
+ sub defineIndex2MsgId {
+     no warnings qw(deprecated);
+-    if (!defined(%Index2MsgId)) {
++    unless (%Index2MsgId) {
+ 	foreach (keys %MsgId) {
+ 	    $Index2MsgId{$MsgId{$_}} = $_;
+ 	}
+diff --git a/lib/mhopt.pl b/lib/mhopt.pl
+index 02fb05e..939109b 100644
+--- a/lib/mhopt.pl
++++ b/lib/mhopt.pl
+@@ -865,7 +865,7 @@ sub update_data_1_to_2 {
+ sub update_data_2_1_to_later {
+     no warnings qw(deprecated);
+     # we can preserve filter arguments
+-    if (defined(%main::MIMEFiltersArgs)) {
++    if (%main::MIMEFiltersArgs) {
+ 	warn qq/         preserving MIMEARGS...\n/;
+ 	%readmail::MIMEFiltersArgs = %main::MIMEFiltersArgs;
+ 	$IsDefault{'MIMEARGS'} = 0;
diff --git a/pkgs/development/perl-modules/mod_perl2-PL_hash_seed.patch b/pkgs/development/perl-modules/mod_perl2-PL_hash_seed.patch
new file mode 100644
index 00000000000..a8aac88de31
--- /dev/null
+++ b/pkgs/development/perl-modules/mod_perl2-PL_hash_seed.patch
@@ -0,0 +1,13 @@
+From https://github.com/Perl/perl5/issues/18617#issuecomment-822056978 by Leont
+
+--- a/src/modules/perl/modperl_perl.c
++++ a/src/modules/perl/modperl_perl.c
+@@ -268,7 +268,7 @@
+ #ifdef MP_NEED_HASH_SEED_FIXUP
+     if (MP_init_hash_seed_set) {
+ #if MP_PERL_VERSION_AT_LEAST(5, 17, 6)
+-        memcpy(&PL_hash_seed, &MP_init_hash_seed,
++        memcpy(PL_hash_seed, &MP_init_hash_seed,
+                 sizeof(PL_hash_seed) > sizeof(MP_init_hash_seed) ?
+                     sizeof(MP_init_hash_seed) : sizeof(PL_hash_seed));
+         PL_hash_seed_set   = MP_init_hash_seed_set;
diff --git a/pkgs/development/perl-modules/module-pluggable.patch b/pkgs/development/perl-modules/module-pluggable.patch
new file mode 100644
index 00000000000..51a029c106b
--- /dev/null
+++ b/pkgs/development/perl-modules/module-pluggable.patch
@@ -0,0 +1,27 @@
+diff -ru Module-Pluggable-4.8/lib/Module/Pluggable/Object.pm Module-Pluggable-4.8-new/lib/Module/Pluggable/Object.pm
+--- Module-Pluggable-4.8/lib/Module/Pluggable/Object.pm	2013-05-28 01:30:06.000000000 +0200
++++ Module-Pluggable-4.8-new/lib/Module/Pluggable/Object.pm	2013-06-02 23:24:52.704125205 +0200
+@@ -180,12 +180,13 @@
+         my $sp = catdir($dir, (split /::/, $searchpath));
+ 
+         # if it doesn't exist or it's not a dir then skip it
+-        next unless ( -e $sp && -d _ ); # Use the cached stat the second time
++        next unless ( -d $sp );
+ 
+         my @files = $self->find_files($sp);
+ 
+         # foreach one we've found 
+         foreach my $file (@files) {
++             
+             # untaint the file; accept .pm only
+             next unless ($file) = ($file =~ /(.*$file_regex)$/); 
+             # parse the file to get the name
+@@ -314,7 +315,7 @@
+                              (my $path = $File::Find::name) =~ s#^\\./##;
+                              push @files, $path;
+                            }
+-                      }, $search_path );
++                      }, "$search_path/." );
+     }
+     #chdir $cwd;
+     return @files;
diff --git a/pkgs/development/perl-modules/net-amazon-mechanicalturk.patch b/pkgs/development/perl-modules/net-amazon-mechanicalturk.patch
new file mode 100644
index 00000000000..dde13b9b0fc
--- /dev/null
+++ b/pkgs/development/perl-modules/net-amazon-mechanicalturk.patch
@@ -0,0 +1,65 @@
+From http://daveviner.blogspot.com/2009/12/amazon-mechanical-turk-perl-library.html
+http://www.vinertech.com/patches/net-amazon-mechanicalturk.patch
+
+diff -rubB Net-Amazon-MechanicalTurk-1.01/lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm Net-Amazon-MechanicalTurk-1.01/lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm
+--- Net-Amazon-MechanicalTurk-1.01/lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm	2007-08-13 11:38:53.000000000 -0700
++++ Net-Amazon-MechanicalTurk-1.01/lib/Net/Amazon/MechanicalTurk/ModuleUtil.pm	2009-12-13 16:37:49.000000000 -0800
+@@ -29,17 +29,21 @@
+ }
+ 
+ sub packageExists {
+-    my ($class, $package) = @_;
++    my ($class, $package, $moduleFile) = @_;
++    
++    if (defined($moduleFile) && exists($INC{$moduleFile})) {
++        return 1;
++    }
+     # Symbol table black magic
+     no strict 'refs';
+-    return defined %{*{"${package}::"}};
++    return scalar(keys(%{*{"${package}::"}}));
+ }
+ 
+ sub require {
+     my ($class, $module) = @_;
+-    if (!$class->packageExists($module)) {
+         my $moduleFile = $module . ".pm";
+         $moduleFile =~ s/::/\//g;
++    if (!$class->packageExists($module, $moduleFile)) {
+         require $moduleFile;
+     }
+ }
+diff -rubB Net-Amazon-MechanicalTurk-1.01/t/73-datagenerator-dbi.t Net-Amazon-MechanicalTurk-1.01/t/73-datagenerator-dbi.t
+--- Net-Amazon-MechanicalTurk-1.01/t/73-datagenerator-dbi.t	2007-08-13 11:38:56.000000000 -0700
++++ Net-Amazon-MechanicalTurk-1.01/t/73-datagenerator-dbi.t	2009-12-13 16:55:30.000000000 -0800
+@@ -8,10 +8,10 @@
+ 
+ eval {
+     require DBI;
+-    require DBD::SQLite2; 
++    require DBD::SQLite; 
+ };
+ if ($@) {
+-    plan skip_all => "SQLite2 not installed.";
++    plan skip_all => "SQLite not installed.";
+ }
+ else {
+     plan tests => 2; 
+@@ -21,7 +21,7 @@
+ #-----------------------
+ my $dbfile = "t/data/test.db";
+ unlink($dbfile) if (-f $dbfile);
+-my $dbh = DBI->connect("dbi:SQLite2:dbname=${dbfile}","","", {
++my $dbh = DBI->connect("dbi:SQLite:dbname=${dbfile}","","", {
+     RaiseError => 1,
+     AutoCommit => 1
+ });
+@@ -42,7 +42,7 @@
+ foreach my $id (1..30) {
+     $sth->execute($id, rand(), scalar localtime());
+ }
+-
++$sth->finish();
+ 
+ # Actual test
+ #----------------------
diff --git a/pkgs/development/perl-modules/perl-opengl-gl-extensions.txt b/pkgs/development/perl-modules/perl-opengl-gl-extensions.txt
new file mode 100644
index 00000000000..42df14c4096
--- /dev/null
+++ b/pkgs/development/perl-modules/perl-opengl-gl-extensions.txt
@@ -0,0 +1,5 @@
+GLUT=20801
+VERSION=3.0 Mesa 10.2.6
+VENDOR=Intel Open Source Technology Center
+RENDERER=Mesa DRI Intel(R) Ivybridge Mobile 
+EXTENSIONS=GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_AMD_performance_monitor GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_conservative_depth GL_ARB_internalformat_query GL_ARB_map_buffer_alignment GL_ARB_shader_atomic_counters GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_ARB_transform_feedback_instanced GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_AMD_shader_trinary_minmax GL_ARB_ES3_compatibility GL_ARB_clear_buffer_object GL_ARB_invalidate_subdata GL_ARB_texture_query_levels GL_ARB_texture_storage_multisample GL_ARB_texture_view GL_ARB_vertex_attrib_binding GL_KHR_debug GL_ARB_buffer_storage GL_ARB_multi_bind GL_ARB_texture_mirror_clamp_to_edge GL_ARB_vertex_type_10f_11f_11f_rev GL_EXT_shader_integer_mix GL_INTEL_performance_query 
diff --git a/pkgs/development/perl-modules/perl-opengl.patch b/pkgs/development/perl-modules/perl-opengl.patch
new file mode 100644
index 00000000000..a44dc4f2e42
--- /dev/null
+++ b/pkgs/development/perl-modules/perl-opengl.patch
@@ -0,0 +1,57 @@
+diff --git a/Makefile.PL b/Makefile.PL
+index 55c485c..8501c02 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -124,14 +124,7 @@ if ($^O eq 'MSWin32' || $IS_W32API)
+ # Look for available libs
+ our @libdirs = qw
+ {
+-  -L/usr/lib
+-  -L/usr/lib/i386-linux-gnu
+-  -L/usr/X11R6/lib
+-  -L/opt/X11/lib
+-  -L/usr/local/lib
+-  -L/usr/openwin/lib
+-  -L/opt/csw/lib
+-  -L/usr/local/freeglut/lib
++  @@libpaths@@
+ };
+ 
+ our @check_libs = qw
+@@ -764,7 +759,6 @@ sub get_extensions
+   my $exc_file = 'gl_exclude.h';
+   unlink($exc_file) if (-e $exc_file);
+   my $glv_file = 'utils/glversion.txt';
+-  unlink($glv_file) if (-e $glv_file);
+ 
+   # Only run the rest if GLUT is installed
+   print "Testing GLUT version\n" if ($verbose);
+@@ -817,7 +811,7 @@ sub get_extensions
+     $make_ver = ";make -f Makefile " .  (length($lib) ? "GLUT_LIB=$lib " : "") . (length($def) ? "GLUT_DEF=$def " : "");
+     print "glversion: '$make_ver'\n" if $verbose>1;
+   }
+-  my $exec = 'cd utils'."$make_ver clean".$make_ver;
++  my $exec = 'cd utils'.$make_ver;
+   print "glversion: $exec\n" if ($verbose);
+   my $stat = `$exec`;
+   print "\n$stat\n\n" if ($verbose);
+diff --git a/utils/Makefile b/utils/Makefile
+index 910dcaf..1b1ac57 100644
+--- a/utils/Makefile
++++ b/utils/Makefile
+@@ -21,14 +21,13 @@ EXTRALIBS=-lGLU -lXi -lXmu -lXext -lX11 -lm
+ all: glversion.txt
+ 
+ glversion.txt: glversion
+-	./glversion > glversion.txt
++	echo "skipping build of glversion.txt"
+ 
+ glversion: glversion.o
+ 	${LINK} glversion.o ${LDFLAGS} ${EXTRALIBS} -o glversion
+ 	chmod u+x glversion
+ 
+ clean:
+-	rm -f glversion.txt
+ 	rm -f glversion
+ 	rm -f glversion.o
+ 
diff --git a/pkgs/development/perl-modules/strip-nondeterminism/default.nix b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
new file mode 100644
index 00000000000..bdbd1a81643
--- /dev/null
+++ b/pkgs/development/perl-modules/strip-nondeterminism/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, file, fetchFromGitLab, buildPerlPackage, ArchiveZip, ArchiveCpio, shortenPerlShebang }:
+
+buildPerlPackage rec {
+  pname = "strip-nondeterminism";
+  version = "1.0.0";
+
+  outputs = [ "out" "dev" ]; # no "devdoc"
+
+  src = fetchFromGitLab {
+    owner = "reproducible-builds";
+    repo = "strip-nondeterminism";
+    domain = "salsa.debian.org";
+    rev = version;
+    sha256 = "1pwar1fyadqxmvb7x4zyw2iawbi5lsfjcg0ps9n9rdjb6an7vv64";
+  };
+
+  # stray test failure
+  doCheck = false;
+
+  nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
+  buildInputs = [ ArchiveZip ArchiveCpio ];
+  propagatedNativeBuildInputs = [ file ];
+
+  perlPostHook = ''
+    # we don’t need the debhelper script
+    rm $out/bin/dh_strip_nondeterminism
+    rm $out/share/man/man1/dh_strip_nondeterminism.1.gz
+  '';
+
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    shortenPerlShebang $out/bin/strip-nondeterminism
+  '';
+
+  meta = with lib; {
+    description = "A Perl module for stripping bits of non-deterministic information";
+    homepage = "https://reproducible-builds.org/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/pkgs/development/perl-modules/xml-grove-utf8.patch b/pkgs/development/perl-modules/xml-grove-utf8.patch
new file mode 100644
index 00000000000..d0b913090be
--- /dev/null
+++ b/pkgs/development/perl-modules/xml-grove-utf8.patch
@@ -0,0 +1,10 @@
+--- XML-Grove-0.46alpha/t/grove.t	2008-07-22 14:47:27.000000000 +0200
++++ XML-Grove-0.46alpha/t/grove.t	2008-07-22 14:46:42.000000000 +0200
+@@ -13,6 +13,7 @@ use XML::Parser::PerlSAX;
+ use XML::Grove::Builder;
+ use XML::Grove::AsString;
+ use XML::Grove::AsCanonXML;
++use utf8;
+ 
+ $loaded = 1;
+ print "ok 1\n";
diff --git a/pkgs/development/perl-modules/xml-parser-0001-HACK-Assumes-Expat-paths-are-good.patch b/pkgs/development/perl-modules/xml-parser-0001-HACK-Assumes-Expat-paths-are-good.patch
new file mode 100644
index 00000000000..add6d9df3b7
--- /dev/null
+++ b/pkgs/development/perl-modules/xml-parser-0001-HACK-Assumes-Expat-paths-are-good.patch
@@ -0,0 +1,45 @@
+From e996904128653c67b04ddbdb1e10cef158098957 Mon Sep 17 00:00:00 2001
+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
+Date: Fri, 6 Dec 2019 23:00:51 -0500
+Subject: [PATCH] [HACK]: Assumes Expat paths are good.
+
+The `check_lib` check fails with the cross-compilation build platform's
+Perl, since apparently `mktemp` is missing...
+
+Even then, side-stepping the issue, it seems it is not actually enough
+to work, as the compilation fails.
+---
+ Makefile.PL | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 505d1df..fc38b76 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -29,12 +29,17 @@ foreach (@ARGV) {
+ @ARGV = @replacement_args;
+ 
+ unless (
+-    check_lib(    # fill in what you prompted the user for here
+-        lib     => [qw(expat)],
+-        header  => ['expat.h'],
+-        incpath => $expat_incpath,
+-        ( $expat_libpath ? ( libpath => $expat_libpath ) : () ),
+-    )
++    #check_lib(    # fill in what you prompted the user for here
++    #    lib     => [qw(expat)],
++    #    header  => ['expat.h'],
++    #    incpath => $expat_incpath,
++    #    ( $expat_libpath ? ( libpath => $expat_libpath ) : () ),
++    #)
++    # The check_lib implementation fails horribly with cross-compilation.
++    # We are giving known good paths to expat.
++    # And in all cases, the previous behaviour of not actually failing
++    # seemed to work just fine :/.
++    false
+ ) {
+     warn <<'Expat_Not_Installed;';
+ 
+-- 
+2.23.0
+