mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 20:12:52 +00:00
add267531f
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/gnucash/versions
106 lines
3.3 KiB
Nix
106 lines
3.3 KiB
Nix
{ fetchurl, stdenv, pkgconfig, makeWrapper, cmake, gtest
|
|
, boost, icu, libxml2, libxslt, gettext, swig, isocodes, gtk3, glibcLocales
|
|
, webkit, dconf, hicolor-icon-theme, libofx, aqbanking, gwenhywfar, libdbi
|
|
, libdbiDrivers, guile, perl, perlPackages
|
|
}:
|
|
|
|
let
|
|
|
|
# Enable gnc-fq-* to run in command line.
|
|
perlWrapper = stdenv.mkDerivation {
|
|
name = perl.name + "-wrapper-for-gnucash";
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ perl ] ++ (with perlPackages; [ FinanceQuote DateManip ]);
|
|
phases = [ "installPhase" ];
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
for script in ${perl}/bin/*; do
|
|
makeWrapper $script $out''${script#${perl}} \
|
|
--prefix "PERL5LIB" ":" "$PERL5LIB"
|
|
done
|
|
'';
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "gnucash-${version}";
|
|
version = "3.3";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/gnucash/${name}.tar.bz2";
|
|
sha256 = "0grr5qi5rn1xvr7qx5d7mcxa2mcgycy2b325ry73bb485a6yv5l3";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper cmake gtest ];
|
|
|
|
buildInputs = [
|
|
boost icu libxml2 libxslt gettext swig isocodes gtk3 glibcLocales
|
|
webkit dconf hicolor-icon-theme libofx aqbanking gwenhywfar libdbi
|
|
libdbiDrivers guile
|
|
perlWrapper perl
|
|
] ++ (with perlPackages; [ FinanceQuote DateManip ]);
|
|
|
|
propagatedUserEnvPkgs = [ dconf ];
|
|
|
|
postPatch = ''
|
|
patchShebangs .
|
|
'';
|
|
|
|
makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
|
|
|
|
postInstall = ''
|
|
# Auto-updaters don't make sense in Nix.
|
|
rm $out/bin/gnc-fq-update
|
|
|
|
# Unnecessary in the release build.
|
|
rm $out/bin/gnucash-valgrind
|
|
|
|
wrapProgram "$out/bin/gnucash" \
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
|
|
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
|
--prefix PERL5LIB ":" "$PERL5LIB" \
|
|
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
|
|
'';
|
|
|
|
# TODO: The following tests FAILED:
|
|
# 61 - test-gnc-timezone (Failed)
|
|
# 70 - test-load-c (Failed)
|
|
# 71 - test-modsysver (Failed)
|
|
# 72 - test-incompatdep (Failed)
|
|
# 73 - test-agedver (Failed)
|
|
# 77 - test-gnc-module-swigged-c (Failed)
|
|
# 78 - test-gnc-module-load-deps (Failed)
|
|
# 80 - test-gnc-module-scm-module (Failed)
|
|
# 81 - test-gnc-module-scm-multi (Failed)
|
|
preCheck = ''
|
|
export LD_LIBRARY_PATH=$PWD/lib:$PWD/lib/gnucash:$PWD/lib/gnucash/test:$LD_LIBRARY_PATH
|
|
export NIX_CFLAGS_LINK="-lgtest -lgtest_main"
|
|
'';
|
|
doCheck = false;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = {
|
|
description = "Personal and small-business financial-accounting application";
|
|
|
|
longDescription = ''
|
|
GnuCash is personal and small-business financial-accounting software,
|
|
freely licensed under the GNU GPL and available for GNU/Linux, BSD,
|
|
Solaris, macOS 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.
|
|
'';
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
homepage = http://www.gnucash.org/;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.peti stdenv.lib.maintainers.domenkozar ];
|
|
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
|
|
};
|
|
}
|