git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #39647 (Add KMyMoney)

This adds KMyMoney, a finance manager for KDE plus a few required dependencies. I ran the upstream test suite as well as the following manual tests: * Basic startup * Completing the wizard * Add some test transactions * GPG encryption * Generation of charts and reports * Rough check whether OFX integration lists supported financial institutions. * Small check of AqBanking implementation, whether accounts and users can be configured, but didn't test actual connectivity with a financial institution. * Check of Weboob integration with a test PayPal backend, however also just with a dummy account and without actually connecting to PayPal. On top of that, the application already is being used by the person requesting me to package this, so I'd guess it works well enough. I'm merging this without the review from @ttuegel because it only adds packages and doesn't change anything fundamental about the KDE ecosystem. The only change here is to add C++ support to "mpir", where the maintainer (@7c6f434c) has approved the change.

commit8cf420e62feb9bbd53a91e89a3a579becb41816a authoraszlig <aszlig@nix.build> dateSat 5 May 2018, 23:46 (9 years ago) parent21be5469e88342
6 files changed+122
pkgs/applications/office/kmymoney/default.nix+70 pkgs/development/libraries/alkimia/default.nix+31 pkgs/development/libraries/kde-frameworks/default.nix+1 pkgs/development/libraries/kde-frameworks/kdewebkit.nix+11 pkgs/development/libraries/mpir/default.nix+2 pkgs/top-level/all-packages.nix+7
pkgs/applications/office/kmymoney/default.nixnew file+70
@@ -0,0 +1,70 @@
1+{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
2+
3+, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
4+, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
5+, kitemmodels, libical, libofx, qgpgme
6+
7+# Needed for running tests:
8+, qtbase, xvfb_run
9+
10+# For weboob, which only supports Python 2.x:
11+, python2Packages
12+}:
13+
14+stdenv.mkDerivation rec {
15+ name = "kmymoney-${version}";
16+ version = "5.0.1";
17+
18+ src = fetchurl {
19+ url = "mirror://kde/stable/kmymoney/${version}/src/${name}.tar.xz";
20+ sha256 = "1c9apnvc07y17pzy4vygry1dai5ass2z7j354lrcppa85b18yvnx";
21+ };
22+
23+ # Hidden dependency that wasn't included in CMakeLists.txt:
24+ NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
25+
26+ enableParallelBuilding = true;
27+
28+ nativeBuildInputs = [
29+ doxygen extra-cmake-modules graphviz kdoctools python2Packages.wrapPython
30+ ];
31+
32+ buildInputs = [
33+ akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
34+ kcontacts kdewebkit kdiagram kholidays kidentitymanagement kitemmodels
35+ libical libofx qgpgme
36+
37+ # Put it into buildInputs so that CMake can find it, even though we patch
38+ # it into the interface later.
39+ python2Packages.weboob
40+ ];
41+
42+ weboobPythonPath = [ python2Packages.weboob ];
43+
44+ postInstall = ''
45+ buildPythonPath "$weboobPythonPath"
46+ patchPythonScript "$out/share/kmymoney/weboob/kmymoneyweboob.py"
47+
48+ # Within the embedded Python interpreter, sys.argv is unavailable, so let's
49+ # assign it to a dummy value so that the assignment of sys.argv[0] injected
50+ # by patchPythonScript doesn't fail:
51+ sed -i -e '1i import sys; sys.argv = [""]' \
52+ "$out/share/kmymoney/weboob/kmymoneyweboob.py"
53+ '';
54+
55+ doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
56+ installCheckPhase = let
57+ pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
58+ in lib.optionalString doInstallCheck ''
59+ QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} CTEST_OUTPUT_ON_FAILURE=1 \
60+ ${xvfb_run}/bin/xvfb-run -s '-screen 0 1024x768x24' make test \
61+ ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
62+ '';
63+
64+ meta = {
65+ description = "Personal finance manager for KDE";
66+ homepage = https://kmymoney.org/;
67+ platforms = lib.platforms.linux;
68+ license = lib.licenses.gpl2Plus;
69+ };
70+}
pkgs/development/libraries/alkimia/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{ mkDerivation, fetchurl, lib
2+, extra-cmake-modules, doxygen, graphviz, qtbase, mpir
3+}:
4+
5+mkDerivation rec {
6+ name = "alkimia-${version}";
7+ version = "7.0.1";
8+
9+ src = fetchurl {
10+ url = "mirror://kde/stable/alkimia/${version}/src/${name}.tar.xz";
11+ sha256 = "1fri76465058fgsyrmdrc3hj1javz4g10mfzqp5rsj7qncjr1i22";
12+ };
13+
14+ nativeBuildInputs = [ extra-cmake-modules doxygen graphviz ];
15+
16+ buildInputs = [ qtbase ];
17+ propagatedBuildInputs = [ mpir ];
18+
19+ meta = {
20+ description = "Library used by KDE finance applications";
21+ longDescription = ''
22+ Alkimia is the infrastructure for common storage and business
23+ logic that will be used by all financial applications in KDE.
24+
25+ The target is to share financial related information over
26+ application bounderies.
27+ '';
28+ license = lib.licenses.lgpl21Plus;
29+ platforms = qtbase.meta.platforms;
30+ };
31+}
pkgs/development/libraries/kde-frameworks/default.nix+1
@@ -155,6 +155,7 @@ let
155155 kded = callPackage ./kded.nix {};
156156 kdesignerplugin = callPackage ./kdesignerplugin.nix {};
157157 kdesu = callPackage ./kdesu.nix {};
158+ kdewebkit = callPackage ./kdewebkit.nix {};
158159 kemoticons = callPackage ./kemoticons.nix {};
159160 kglobalaccel = callPackage ./kglobalaccel.nix {};
160161 kiconthemes = callPackage ./kiconthemes {};
pkgs/development/libraries/kde-frameworks/kdewebkit.nixnew file+11
@@ -0,0 +1,11 @@
1+{ mkDerivation, extra-cmake-modules
2+, kconfig, kcoreaddons, kio, kparts, qtwebkit
3+}:
4+
5+mkDerivation {
6+ name = "kdewebkit";
7+ nativeBuildInputs = [ extra-cmake-modules ];
8+ buildInputs = [ kconfig kcoreaddons kio kparts ];
9+ propagatedBuildInputs = [ qtwebkit ];
10+ outputs = [ "out" "dev" ];
11+}
pkgs/development/libraries/mpir/default.nix+2
@@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
1111 sha256 = "1fvmhrqdjs925hzr2i8bszm50h00gwsh17p2kn2pi51zrxck9xjj";
1212 };
1313
14+ configureFlags = [ "--enable-cxx" ];
15+
1416 meta = {
1517 inherit version;
1618 description = ''A highly optimised library for bignum arithmetic forked from GMP'';
pkgs/top-level/all-packages.nix+7
@@ -11229,6 +11229,8 @@ with pkgs;
1122911229
1123011230 accounts-qt = callPackage ../development/libraries/accounts-qt { };
1123111231
11232+ alkimia = callPackage ../development/libraries/alkimia { };
11233+
1123211234 fcitx-qt5 = callPackage ../tools/inputmethods/fcitx/fcitx-qt5.nix { };
1123311235
1123411236 qgpgme = callPackage ../development/libraries/gpgme { };
@@ -16533,6 +16535,11 @@ with pkgs;
1653316535
1653416536 kmplayer = libsForQt5.callPackage ../applications/video/kmplayer { };
1653516537
16538+ kmymoney = libsForQt5.callPackage ../applications/office/kmymoney {
16539+ inherit (kdeApplications) kidentitymanagement;
16540+ inherit (kdeFrameworks) kdewebkit;
16541+ };
16542+
1653616543 kodestudio = callPackage ../applications/editors/kodestudio { };
1653716544
1653816545 konversation = libsForQt5.callPackage ../applications/networking/irc/konversation { };