gnucash: refactor
Also add myself as maintainer.
This commit is contained in:
parent
c4384583ea
commit
b4c1cf5e36
@ -1,9 +1,10 @@
|
|||||||
{ fetchurl
|
{ lib
|
||||||
, lib
|
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
, aqbanking
|
, aqbanking
|
||||||
, boost
|
, boost
|
||||||
, cmake
|
, cmake
|
||||||
|
, gettext
|
||||||
, glib
|
, glib
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
, gtest
|
, gtest
|
||||||
@ -16,7 +17,6 @@
|
|||||||
, libxml2
|
, libxml2
|
||||||
, libxslt
|
, libxslt
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, perl
|
|
||||||
, perlPackages
|
, perlPackages
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, swig
|
, swig
|
||||||
@ -28,13 +28,15 @@ stdenv.mkDerivation rec {
|
|||||||
pname = "gnucash";
|
pname = "gnucash";
|
||||||
version = "4.9";
|
version = "4.9";
|
||||||
|
|
||||||
|
# raw source code doesn't work out of box; fetchFromGitHub not usable
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/Gnucash/gnucash/releases/download/${version}/gnucash-${version}.tar.bz2";
|
url = "https://github.com/Gnucash/gnucash/releases/download/${version}/${pname}-${version}.tar.bz2";
|
||||||
sha256 = "0bdpzb0wc9bjph5iff7133ppnkcqzfd10yi2qagij4mpq4q1qmcs";
|
hash = "sha256-mlUcMMG3EhmfwiJ6EJr7mE177xjhOBcLvHIlxsH6ty0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
gettext
|
||||||
makeWrapper
|
makeWrapper
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
@ -53,11 +55,15 @@ stdenv.mkDerivation rec {
|
|||||||
libofx
|
libofx
|
||||||
libxml2
|
libxml2
|
||||||
libxslt
|
libxslt
|
||||||
perl
|
|
||||||
pkg-config
|
pkg-config
|
||||||
swig
|
swig
|
||||||
webkitgtk
|
webkitgtk
|
||||||
] ++ (with perlPackages; [ FinanceQuote DateManip ]);
|
]
|
||||||
|
++ (with perlPackages; [
|
||||||
|
DateManip
|
||||||
|
FinanceQuote
|
||||||
|
perl
|
||||||
|
]);
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# this patch disables test-gnc-timezone and test-gnc-datetime which fail due to nix datetime challenges
|
# this patch disables test-gnc-timezone and test-gnc-datetime which fail due to nix datetime challenges
|
||||||
@ -68,16 +74,14 @@ stdenv.mkDerivation rec {
|
|||||||
./0003-remove-valgrind.patch
|
./0003-remove-valgrind.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
# this needs to be an environment variable and not a cmake flag to suppress
|
||||||
export GUILE_AUTO_COMPILE=0 # this needs to be an env variable and not a cmake flag to suppress guile warning
|
# guile warning
|
||||||
'';
|
GUILE_AUTO_COMPILE="0";
|
||||||
|
|
||||||
|
# `make check` target does not define its prerequisites but expects them to
|
||||||
|
# have already been built. The list of targets below was built through trial
|
||||||
|
# and error based on failing tests.
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
/*
|
|
||||||
GNUcash's `make check` target does not define its prerequisites but expects them to have already been built.
|
|
||||||
The list of targets below was built through trial and error based on failing tests.
|
|
||||||
*/
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
make \
|
make \
|
||||||
test-account-object \
|
test-account-object \
|
||||||
@ -156,12 +160,15 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
gappsWrapperArgs+=(
|
gappsWrapperArgs+=(
|
||||||
--set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd # specify where db drivers are
|
# db drivers location
|
||||||
--set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "${pname}-${version}"} # specify where nix puts the gnome settings schemas
|
--set GNC_DBD_DIR ${libdbiDrivers}/lib/dbd
|
||||||
|
# gnome settings schemas location on Nix
|
||||||
|
--set GSETTINGS_SCHEMA_DIR ${glib.makeSchemaPath "$out" "${pname}-${version}"}
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# wrapGAppsHook would wrap all binaries including the cli utils which need Perl wrapping
|
# wrapGAppsHook would wrap all binaries including the cli utils which need
|
||||||
|
# Perl wrapping
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
|
|
||||||
# gnucash is wrapped using the args constructed for wrapGAppsHook.
|
# gnucash is wrapped using the args constructed for wrapGAppsHook.
|
||||||
@ -176,15 +183,31 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Personal and small business double entry accounting application.";
|
|
||||||
longDescription = ''
|
|
||||||
Designed to be easy to use, yet powerful and flexible, GnuCash allows you to track bank accounts, stocks, income and expenses.
|
|
||||||
As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports.
|
|
||||||
'';
|
|
||||||
|
|
||||||
homepage = "https://www.gnucash.org/";
|
homepage = "https://www.gnucash.org/";
|
||||||
|
description = "Free software for double entry accounting";
|
||||||
|
longDescription = ''
|
||||||
|
GnuCash is personal and small-business financial-accounting software,
|
||||||
|
freely licensed under the GNU GPL and available for GNU/Linux, BSD,
|
||||||
|
Solaris, Mac OS X and Microsoft Windows.
|
||||||
|
|
||||||
|
Designed to be easy to use, yet powerful and flexible, GnuCash allows you
|
||||||
|
to track bank accounts, stocks, income and expenses. As quick and
|
||||||
|
intuitive to use as a checkbook register, it is based on professional
|
||||||
|
accounting principles to ensure balanced books and accurate reports.
|
||||||
|
|
||||||
|
Some interesting features:
|
||||||
|
|
||||||
|
- Double-Entry Accounting
|
||||||
|
- Stock/Bond/Mutual Fund Accounts
|
||||||
|
- Small-Business Accounting
|
||||||
|
- Reports, Graphs
|
||||||
|
- QIF/OFX/HBCI Import, Transaction Matching
|
||||||
|
- Scheduled Transactions
|
||||||
|
- Financial Calculations
|
||||||
|
'';
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.domenkozar ];
|
maintainers = with maintainers; [ domenkozar AndersonTorres ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
# TODO: investigate Darwin support
|
||||||
|
Loading…
Reference in New Issue
Block a user