guix_mirror_bot pushed a commit to branch sysadmin-team
in repository guix.

commit ab0f5d84f59b629a2593c51b070966befa0adb33
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Aug 26 22:41:26 2025 +0200

    gnu: Add postgresql-17.
    
    * gnu/packages/databases.scm (postgresql-17): New variable.
    (postgresql-16): Redefine with postgresql-17 inheritance (same
    derivation as in previous commit).
---
 gnu/packages/databases.scm | 59 ++++++++++++++++++++++++++++++++++++----------
 1 file changed, 47 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ac3373e231..8c9344b5b6 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1507,17 +1507,17 @@ and high-availability (HA).")
     (license license:gpl2)))                  ;'COPYING' says "version 2" only
 
 ;; Don't forget to update the other postgresql packages when upgrading this 
one.
-(define-public postgresql-16
+(define-public postgresql-17
   (package
     (name "postgresql")
-    (version "16.11")
+    (version "17.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://ftp.postgresql.org/pub/source/v";
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1b4f2wpv9h6zy8fqkn4gjvwawr7gxr4l1hfiif7pvmq37p10isvd"))
+                "1dg9labqgph2idaypb8khdvbag29pr3h4bqv5w8k7kgc08rk97pg"))
               (patches (search-patches
                         "postgresql-disable-normalize_exec_path.patch"))))
     (build-system gnu-build-system)
@@ -1547,18 +1547,22 @@ and high-availability (HA).")
           (add-after 'build 'build-contrib
             (lambda _
               (invoke "make" "-C" "contrib")))
+          ;; FIXME: Install manpages too.
+          ;; The 'install-mangpages phase in postgresql-16 fails silently here.
           (add-after 'install 'install-contrib
             (lambda _
-              (invoke "make" "-C" "contrib" "install")))
-          (add-after 'install 'install-manuals
-            (lambda _
-              (with-directory-excursion "doc/src/sgml"
-                (invoke "make" "install-man")
-                (invoke "make" "postgres.info")
-                (install-file "postgres.info"
-                              (string-append #$output "/share/info"))))))))
+              (invoke "make" "-C" "contrib" "install"))))))
     (native-inputs
-     (list docbook-xml-4.5 docbook2x libxml2 perl pkg-config texinfo))
+     (list bison
+           docbook-xml-4.5
+           docbook-xsl
+           docbook2x
+           flex
+           libxml2
+           libxslt
+           perl
+           pkg-config
+           texinfo))
     (inputs
      (list icu4c readline `(,util-linux "lib") openssl zlib))
     (home-page "https://www.postgresql.org/";)
@@ -1572,6 +1576,37 @@ TIMESTAMP.  It also supports storage of binary large 
objects, including
 pictures, sounds, or video.")
     (license (license:x11-style "file://COPYRIGHT"))))
 
+(define-public postgresql-16
+  (package
+    (inherit postgresql-17)
+    (name "postgresql")
+    (version "16.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://ftp.postgresql.org/pub/source/v";
+                                  version "/postgresql-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0hib575m9x3z8c71gkcv9jsyq77d3qk7q2zgzvfy6clwrvs8b16y"))
+              (patches (search-patches
+                        "postgresql-disable-normalize_exec_path.patch"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments postgresql-17)
+       ((#:phases phases #~%standard-phases)
+        #~(modify-phases #$phases
+            (add-after 'install 'install-manuals
+              (lambda _
+                (with-directory-excursion "doc/src/sgml"
+                  (invoke "make" "install-man")
+                  (invoke "make" "postgres.info")
+                  (install-file "postgres.info"
+                                (string-append #$output "/share/info")))))))))
+    (native-inputs (modify-inputs (package-native-inputs postgresql-17)
+                     (delete "bison")
+                     (delete "docbook-xsl")
+                     (delete "flex")
+                     (delete "libxslt")))))
+
 (define-public postgresql-15
   (package
     (inherit postgresql-16)

Reply via email to