From patchwork Wed Sep 8 14:54:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 32714 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CCEFB27BBE3; Wed, 8 Sep 2021 15:57:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4DDDF27BBE1 for ; Wed, 8 Sep 2021 15:57:20 +0100 (BST) Received: from localhost ([::1]:55698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNz0p-0001bR-CD for patchwork@mira.cbaines.net; Wed, 08 Sep 2021 10:57:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNyyh-00062y-3j for guix-patches@gnu.org; Wed, 08 Sep 2021 10:55:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNyye-0002nj-Rf for guix-patches@gnu.org; Wed, 08 Sep 2021 10:55:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNyye-00088a-QP for guix-patches@gnu.org; Wed, 08 Sep 2021 10:55:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50476] [PATCH 07/10] gnu: guile-dbd-postgresql: Inherit from guile-dbi. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Sep 2021 14:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50476 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50476@debbugs.gnu.org Cc: Arun Isaac Received: via spool by 50476-submit@debbugs.gnu.org id=B50476.163111286731138 (code B ref 50476); Wed, 08 Sep 2021 14:55:04 +0000 Received: (at 50476) by debbugs.gnu.org; 8 Sep 2021 14:54:27 +0000 Received: from localhost ([127.0.0.1]:33321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNyy2-000862-KA for submit@debbugs.gnu.org; Wed, 08 Sep 2021 10:54:26 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:37688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNyxu-00084F-Jh for 50476@debbugs.gnu.org; Wed, 08 Sep 2021 10:54:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N3nybh1xuiLlfS6Lj8cu1C+RKaYMgsUT3GVZrbhMxfE=; b=DoRFOSWJzfTXZBAE8geA7WJWZ7 r5ED++GMV9FLqqFEQz45kGM94Riann5KfMhqpKzFqCF95PjvGZPLRXphUPFoSOtgKZF9t3bKRvFjD fzhnI66w2HadVf8xDy1pGZpWidQO6y18Ia9oAZ/3YAvJS3QDgWmShtmqSf3pYMwdRa9qwxNeFvDzr gJgjDZ6bQW+0GaCwGgxU88BGgLmPiX8KD11z/zXUEngdxjBuwQlT9u/SWvtr+lrVp/SSnH0TbpBFv ckR6kUeQ/+mqzZ4VRPVgI//Q48LWiqJYY+8wrbECKRq65nL2DX3wHLorYJbPKgI8ZRLU/M4o0dfw3 7a7uRv8w==; Received: from [192.168.2.1] (port=55638 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNyxs-000W6b-7q; Wed, 08 Sep 2021 20:24:16 +0530 From: Arun Isaac Date: Wed, 8 Sep 2021 20:24:10 +0530 Message-Id: <20210908145413.4652-7-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210908145413.4652-1-arunisaac@systemreboot.net> References: <20210908145413.4652-1-arunisaac@systemreboot.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 1a3ddcf25d..c59e7e51c8 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