git.iko.soy/typeable/nixpkgs
on master help sign in
gnucash: enable dbi

My accounts are stored in the DBI backend (SQLite, specifically). Before the present change, GnuCash would be compiled without DBI support (`--disable-dbi` flag), so I could only use the XML backend. Now I can use either backend. I made the change only for 2.6. It looks like 2.4 works the same way, so maybe I'll enable DBI for that one later. Making nix packages is delightful! It might replace my accounting hobby!

commit70c339dd47e1fc67bb1e2319f5619e36ded45b59 authorThomas Levine <_@thomaslevine.com> dateFri 12 Feb 2016, 19:48 (11 years ago) parent99b43a2
1 file changed+11−3
pkgs/applications/office/gnucash/2.6.nix+11−3
pkgs/applications/office/gnucash/2.6.nix+11−3
@@ -1,7 +1,7 @@
11{ fetchurl, stdenv, pkgconfig, libxml2, libxslt, perl, perlPackages, gconf, guile
22, intltool, glib, gtk, libofx, aqbanking, gwenhywfar, libgnomecanvas, goffice
33, webkit, glibcLocales, gsettings_desktop_schemas, makeWrapper, dconf, file
4−, gettext, swig, slibGuile, enchant, bzip2, isocodes
4+, gettext, swig, slibGuile, enchant, bzip2, isocodes, libdbi, libdbiDrivers
55}:
66
77/*
@@ -33,6 +33,8 @@ stdenv.mkDerivation rec {
3333 perl perlPackages.FinanceQuote perlPackages.DateManip
3434 # guile
3535 guile slibGuile
36+ # database backends
37+ libdbi libdbiDrivers
3638 # build
3739 makeWrapper
3840 ];
@@ -41,8 +43,14 @@ stdenv.mkDerivation rec {
4143 patchShebangs ./src
4244 '';
4345
44− configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3 --disable-dbi --enable-ofx --enable-aqbanking";
45−
46+ configureFlags = [
47+ "CFLAGS=-O3"
48+ "CXXFLAGS=-O3"
49+ "--enable-dbi"
50+ "--with-dbi-dbd-dir=${libdbiDrivers}/lib/dbd/"
51+ "--enable-ofx"
52+ "--enable-aqbanking"
53+ ];
4654
4755 postInstall = ''
4856 # Auto-updaters don't make sense in Nix.