From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from eggs.gnu.org ([2001:470:142:3::10]:59883)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1iXPOx-00039g-Ma
 for guix-patches@gnu.org; Wed, 20 Nov 2019 07:48:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1iXPOw-0004i0-J9
 for guix-patches@gnu.org; Wed, 20 Nov 2019 07:48:07 -0500
Received: from debbugs.gnu.org ([209.51.188.43]:40275)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1iXPOw-0004hq-Ff
 for guix-patches@gnu.org; Wed, 20 Nov 2019 07:48:06 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1iXPOw-0005ei-C3
 for guix-patches@gnu.org; Wed, 20 Nov 2019 07:48:06 -0500
Subject: [bug#38298] [PATCH 3/3] gnu: gnucash: Activate database support.
Resent-Message-ID: <handler.38298.B38298.157425407521704@debbugs.gnu.org>
From: Guillaume Le Vaillant <glv@posteo.net>
Date: Wed, 20 Nov 2019 13:46:39 +0100
Message-Id: <20191120124639.8763-3-glv@posteo.net>
In-Reply-To: <20191120124639.8763-1-glv@posteo.net>
References: <878soaraak.fsf@yamatai>
 <20191120124639.8763-1-glv@posteo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+kyle=kyleam.com@gnu.org>
To: 38298@debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv@posteo.net>

* gnu/packages/gnucash.scm (gnucash)[inputs]: Add libdbi and libdbi-drivers.
  [arguments]: Remove '-DWITH_SQL=OFF' from 'configure-flags' and add
  'GNC_DBD_DIR' to program wrapping.
---
 gnu/packages/gnucash.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index de916a8829..af017e108d 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gnome)
@@ -70,6 +72,8 @@
        ("icu4c" ,icu4c)
        ("glib" ,glib)
        ("gtk" ,gtk+)
+       ("libdbi" ,libdbi)
+       ("libdbi-drivers" ,libdbi-drivers)
        ("libgnomecanvas" ,libgnomecanvas)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
@@ -89,8 +93,7 @@
     (arguments
      `(#:test-target "check"
        #:configure-flags
-       (list "-DWITH_OFX=OFF"           ; libofx is not available yet
-             "-DWITH_SQL=OFF")          ; without dbi.h
+       (list "-DWITH_OFX=OFF")          ; libofx is not available yet
        #:make-flags '("GUILE_AUTO_COMPILE=0")
        #:modules ((guix build cmake-build-system)
                   ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
@@ -147,6 +150,10 @@
              (for-each (lambda (prog)
                          (wrap-program (string-append (assoc-ref outputs "out")
                                                       "/bin/" prog)
+                           `("GNC_DBD_DIR" =
+                             (,(string-append
+                                (assoc-ref inputs "libdbi-drivers")
+                                "/lib/dbd")))
                            `("PERL5LIB" ":" prefix
                              ,(map (lambda (o)
                                      (string-append o "/lib/perl5/site_perl/"
-- 
2.24.0