@@ -1,116 +0,0 @@
1−{ fetchurl, fetchpatch, stdenv, intltool, pkgconfig, file, makeWrapper
2−, libxml2, libxslt, perl, perlPackages, gconf, guile
3−, glib, gtk2, libofx, aqbanking, gwenhywfar, libgnomecanvas, goffice
4−, webkit, glibcLocales, gsettings-desktop-schemas, dconf
5−, gettext, swig, slibGuile, enchant, bzip2, isocodes, libdbi, libdbiDrivers
6−, pango, gdk_pixbuf, hicolor-icon-theme
7−}:
8−
9−/*
10−Two cave-ats right now:
11− 1. HTML reports are broken
12− 2. You need to have dconf installed (GNOME3 should have it automatically,
13− otherwise put it in environment.systemPackages), for settings
14−*/
15−
16−stdenv.mkDerivation rec {
17− name = "gnucash-2.6.18-1";
18−
19− src = fetchurl {
20− url = "mirror://sourceforge/gnucash/${name}.tar.bz2";
21− sha256 = "1794qi7lkn1kbnhzk08wawacfcphbln3ngdl3q0qax5drv7hnwv8";
22− };
23−
24− patches = [
25− (fetchpatch {
26− sha256 = "11nlf9j7jm1i37mfcmmnkplxr3nlf257fxd01095vd65i2rn1m8h";
27− name = "fix-brittle-test.patch";
28− url = "https://github.com/Gnucash/gnucash/commit/42ac55e03a1a84739f4a5b7a247c31d91c0adc4a.patch";
29− })
30− ];
31−
32− nativeBuildInputs = [ intltool pkgconfig file makeWrapper ];
33−
34− buildInputs = [
35− # general
36− libxml2 libxslt glibcLocales gettext swig enchant
37− bzip2 isocodes
38− # glib, gtk...
39− glib gtk2 goffice webkit hicolor-icon-theme
40− # gnome...
41− dconf gconf libgnomecanvas gsettings-desktop-schemas
42− # financial
43− libofx aqbanking gwenhywfar
44− # perl
45− perl perlPackages.FinanceQuote perlPackages.DateManip
46− # guile
47− guile slibGuile
48− # database backends
49− libdbi libdbiDrivers
50− ];
51−
52− postPatch = ''
53− patchShebangs ./src
54− '';
55−
56− configureFlags = [
57− "CFLAGS=-O3"
58− "CXXFLAGS=-O3"
59− "--enable-dbi"
60− "--with-dbi-dbd-dir=${libdbiDrivers}/lib/dbd/"
61− "--enable-ofx"
62− "--enable-aqbanking"
63− ];
64−
65− postInstall = ''
66− # Auto-updaters don't make sense in Nix.
67− rm $out/bin/gnc-fq-update
68−
69− #sed -i $out/bin/update-gnucash-gconf \
70− # -e 's|--config-source=[^ ]* --install-schema-file|--makefile-install-rule|'
71−
72− for prog in $(echo "$out/bin/"*)
73− do
74− # Don't wrap the gnc-fq-* scripts, since gnucash calls them as
75− # "perl <script>', i.e. they must be Perl scripts.
76− if [[ $prog =~ gnc-fq ]]; then continue; fi
77− wrapProgram "$prog" \
78− --set SCHEME_LIBRARY_PATH "$SCHEME_LIBRARY_PATH" \
79− --prefix GUILE_LOAD_PATH ":" "$GUILE_LOAD_PATH" \
80− --prefix PERL5LIB ":" "$PERL5LIB" \
81− --set GCONF_CONFIG_SOURCE 'xml::~/.gconf' \
82− --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
83− --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules" \
84− --prefix PATH ":" "$out/bin:${stdenv.lib.makeBinPath [ perl gconf ]}"
85− done
86− '';
87−
88− # The following settings fix failures in the test suite. It's not required otherwise.
89− LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ guile glib gtk2 pango gdk_pixbuf ];
90− preCheck = "export GNC_DOT_DIR=$PWD/dot-gnucash";
91− doCheck = true;
92−
93− enableParallelBuilding = true;
94−
95− meta = {
96− description = "Personal and small-business financial-accounting application";
97−
98− longDescription = ''
99− GnuCash is personal and small-business financial-accounting software,
100− freely licensed under the GNU GPL and available for GNU/Linux, BSD,
101− Solaris, macOS and Microsoft Windows.
102−
103− Designed to be easy to use, yet powerful and flexible, GnuCash allows
104− you to track bank accounts, stocks, income and expenses. As quick and
105− intuitive to use as a checkbook register, it is based on professional
106− accounting principles to ensure balanced books and accurate reports.
107− '';
108−
109− license = stdenv.lib.licenses.gpl2Plus;
110−
111− homepage = http://www.gnucash.org/;
112−
113− maintainers = [ stdenv.lib.maintainers.peti stdenv.lib.maintainers.domenkozar ];
114− platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
115− };
116−}