Subject: [bug#63894] [PATCH 08/55] gnu: Add perl-test-postgresql.

From: Antero Mejr <[email-masked]>
Date: Sun, 4 Jun 2023 17:42:02 +0000

* gnu/packages/databases.scm (perl-test-postgresql): New variable.
---
 gnu/packages/databases.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a587ab30bc..6a173094c0 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -2492,6 +2492,38 @@ (define-public perl-sql-translator
 data (INSERT, UPDATE, DELETE).")
     (license license:perl-license)))
 
+(define-public perl-test-postgresql
+  (package
+    (name "perl-test-postgresql")
+    (version "1.29")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/T/TJ/TJC/Test-PostgreSQL-" version
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "17jgiqdyprb8q4855anica2kr0lxdi9rnq27vsfclk6ai7jzgb0q"))))
+    (build-system perl-build-system)
+    (arguments
+     (list #:tests? #f)) ;2/41 fail, require running Postgres server
+    (native-inputs (list perl-module-build-tiny
+                         perl-test-sharedfork))
+    (propagated-inputs (list perl-dbd-pg
+                             perl-dbi
+                             perl-file-which
+                             perl-function-parameters
+                             perl-moo
+                             perl-tie-hash-method
+                             perl-try-tiny
+                             perl-type-tiny))
+    (home-page "https://metacpan.org/release/Test-PostgreSQL")
+    (synopsis "PostgreSQL runner for tests")
+    (description
+     "@code{Test::PostgreSQL} automatically setups a PostgreSQL instance in a
+temporary directory, and destroys it when the perl script exits.")
+    (license license:artistic2.0)))
+
 (define-public unixodbc
   (package
    (name "unixodbc")
-- 
2.39.2