all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Arun Isaac" <arunisaac@systemreboot.net>
Cc: 50476@debbugs.gnu.org
Subject: [bug#50476] [PATCH v2 07/10] gnu: guile-dbd-postgresql: Inherit from guile-dbi.
Date: Thu, 30 Sep 2021 22:22:32 +0530	[thread overview]
Message-ID: <20210930165235.13180-8-arunisaac@systemreboot.net> (raw)
In-Reply-To: <87wnn2j9fs.fsf@gnu.org>

* gnu/packages/guile-xyz.scm (guile-dbd-postgresql): Inherit from
guile-dbi. Remove version, source, build-system, home-page and license fields.
[arguments]: Remove patch-src/Makefile.am phase. Do not return #t from phases.
[native-inputs]: Replace guile-dbi-bootstrap with guile-dbi.
---
 gnu/packages/guile-xyz.scm | 72 ++++++++++++--------------------------
 1 file changed, 23 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 96182d7362..bc86bf3f68 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1585,60 +1585,34 @@ It currently supports MySQL, Postgres and SQLite3.")
 SQL databases.  This package implements the interface for SQLite.")))
 
 (define-public guile-dbd-postgresql
-  (let ((commit "e97589b6b018b206c901e4cc24db463407a4036b")
-        (revision 0))
-    (package
-      (name "guile-dbd-postgresql")
-      (version (string-append
-                "2.1.6-" (number->string revision) "." (string-take commit 7)))
-      (source
-       (origin
-         (method git-fetch)
-         (uri (git-reference
-               (url "https://github.com/opencog/guile-dbi")
-               (commit commit)))
-         (file-name (git-file-name name version))
-         (sha256
-          (base32 "0n1gv9a0kdys10a4qmnrwvg5sydwb03880asri4gqdchcj3fimni"))))
-      (build-system gnu-build-system)
-      (arguments
-       '(#:phases
-         (modify-phases %standard-phases
-           (add-after 'unpack 'chdir
+  (package
+    (inherit guile-dbi)
+    (name "guile-dbd-postgresql")
+    (arguments
+     (substitute-keyword-arguments (package-arguments guile-dbi)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'chdir
              (lambda _
                ;; The upstream Git repository contains all the code, so change
-               ;; to the relevant directory.
-               (chdir "guile-dbd-postgresql")
-               #t))
-           (add-after 'chdir 'patch-src/Makefile.am
-             (lambda* (#:key inputs #:allow-other-keys)
-               (substitute* "src/Makefile.am"
-                 (("/usr/include")
-                  (string-append (assoc-ref inputs "postgresql") "/include")))
-               #t))
-           (add-after 'patch-src/Makefile.am 'patch-src
+               ;; to the directory specific to guile-dbd-mysql.
+               (chdir "guile-dbd-postgresql")))
+           (add-after 'chdir 'patch-src
              (lambda _
                (substitute* "src/guile-dbd-postgresql.c"
-                 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))
-               #t)))))
-      (native-inputs
-       `(("pkg-config" ,pkg-config)
-         ("automake" ,automake)
-         ("autoconf" ,autoconf)
-         ("perl" ,perl)
-         ("libtool" ,libtool)
-         ("guile-dbi-bootstrap" ,guile-dbi-bootstrap)))
-      (inputs
-       `(("postgresql" ,postgresql)
-         ("zlib" ,zlib)))
-      (synopsis "Guile DBI driver for PostgreSQL")
-      (home-page
-       "https://github.com/opencog/guile-dbi/tree/master/guile-dbd-postgresql")
-      (description
-       "@code{guile-dbi} is a library for Guile that provides a convenient
+                 (("postgresql/libpq-fe\\.h") "libpq-fe.h"))))
+           (delete 'patch-extension-path)))))
+    (inputs
+     `(("postgresql" ,postgresql)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("guile-dbi" ,guile-dbi)         ; only required for headers
+       ,@(package-native-inputs guile-dbi)))
+    (synopsis "Guile DBI driver for PostgreSQL")
+    (description
+     "@code{guile-dbi} is a library for Guile that provides a convenient
 interface to SQL databases.  This package implements the interface for
-PostgreSQL.")
-      (license license:gpl2+))))
+PostgreSQL.")))
 
 (define-public guile-config
   (package
-- 
2.33.0





  parent reply	other threads:[~2021-09-30 20:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 14:45 [bug#50476] [PATCH 00/10] Update guile-dbi and guile-dbd-* Arun Isaac
2021-09-08 14:54 ` [bug#50476] [PATCH 01/10] gnu: guile-dbi: Update upstream source Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 02/10] gnu: guile-dbi: Remove hard-coded guile effective version Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 03/10] gnu: guile-dbi: Search for dbd libraries using native-search-paths Arun Isaac
2021-09-21 12:53     ` [bug#50476] [PATCH 00/10] Update guile-dbi and guile-dbd-* Ludovic Courtès
2021-09-22 20:23       ` Arun Isaac
2021-09-27 15:59         ` Ludovic Courtès
2021-09-30 16:52           ` [bug#50476] [PATCH v2 " Arun Isaac
2021-10-02 14:04             ` Ludovic Courtès
2021-10-03 15:03               ` bug#50476: " Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 01/10] gnu: guile-dbi: Update upstream source Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 02/10] gnu: guile-dbi: Remove hard-coded guile effective version Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 03/10] gnu: guile-dbi: Search for dbd libraries using native-search-paths Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 04/10] gnu: guile-dbi: Do not return #t from custom phases Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 05/10] gnu: guile-dbi: Update to 2.1.8 Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 06/10] gnu: guile-dbd-sqlite3: Inherit from guile-dbi Arun Isaac
2021-09-30 16:52           ` Arun Isaac [this message]
2021-09-30 16:52           ` [bug#50476] [PATCH v2 08/10] gnu: guile-dbi-bootstrap: Remove package Arun Isaac
2021-09-30 16:52           ` [bug#50476] [PATCH v2 09/10] gnu: Add guile-dbd-mysql Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 04/10] gnu: guile-dbi: Do not return #t from custom phases Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 05/10] gnu: guile-dbi: Update to 2.1.8 Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 06/10] gnu: guile-dbd-sqlite3: Inherit from guile-dbi Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 07/10] gnu: guile-dbd-postgresql: " Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 08/10] gnu: guile-dbi-bootstrap: Remove package Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 09/10] gnu: Add guile-dbd-mysql Arun Isaac
2021-09-08 14:54   ` [bug#50476] [PATCH 10/10] gnu: guile-dbd-sqlite3: Use normal variable instead of @ reference Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210930165235.13180-8-arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=50476@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.