1 { stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
5 , akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
6 , kcmutils, kcontacts, qtwebengine, kdiagram, kholidays, kidentitymanagement
7 , kitemmodels, libical, libofx, qgpgme
11 # Needed for running tests:
17 stdenv.mkDerivation rec {
22 url = "mirror://kde/stable/kmymoney/${version}/src/${pname}-${version}.tar.xz";
23 sha256 = "sha256-OTi4B4tzkboy4Su0I5di+uE0aDoMLsGnUQXDAso+Xj8=";
27 # Remove this when upgrading to a KMyMoney release that includes
28 # https://invent.kde.org/office/kmymoney/-/merge_requests/118
29 "-DENABLE_WEBENGINE=ON"
32 # Hidden dependency that wasn't included in CMakeLists.txt:
33 env.NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
36 doxygen extra-cmake-modules graphviz kdoctools
37 python3.pkgs.wrapPython wrapQtAppsHook autoPatchelfHook
41 akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
42 kcontacts qtwebengine kdiagram kholidays kidentitymanagement kitemmodels
46 # Put it into buildInputs so that CMake can find it, even though we patch
47 # it into the interface later.
52 buildPythonPath "${python3.pkgs.woob}"
53 patchPythonScript "kmymoney/plugins/woob/interface/kmymoneywoob.py"
55 # Within the embedded Python interpreter, sys.argv is unavailable, so let's
56 # assign it to a dummy value so that the assignment of sys.argv[0] injected
57 # by patchPythonScript doesn't fail:
58 sed -i -e '1i import sys; sys.argv = [""]' \
59 "kmymoney/plugins/woob/interface/kmymoneywoob.py"
62 doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
63 nativeInstallCheckInputs = [ xvfb-run ];
65 lib.optionalString doInstallCheck ''
66 xvfb-run -s '-screen 0 1024x768x24' make test \
67 ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
70 # libpython is required by the python interpreter embedded in kmymoney, so we
71 # need to explicitly tell autoPatchelf about it.
73 patchelf --debug --add-needed libpython${python3.pythonVersion}.so \
74 "$out/bin/.kmymoney-wrapped"
78 description = "Personal finance manager for KDE";
79 mainProgram = "kmymoney";
80 homepage = "https://kmymoney.org/";
81 platforms = lib.platforms.linux;
82 license = lib.licenses.gpl2Plus;
83 maintainers = with lib.maintainers; [ aidalgol das-g ];