2018-04-28 02:21:22 +02:00
|
|
|
{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
|
2019-07-05 17:42:08 +02:00
|
|
|
, wrapQtAppsHook
|
2018-04-28 02:21:22 +02:00
|
|
|
|
|
|
|
, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
|
|
|
|
, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
|
|
|
|
, kitemmodels, libical, libofx, qgpgme
|
|
|
|
|
2019-05-09 20:07:13 +02:00
|
|
|
, sqlcipher
|
|
|
|
|
2018-04-28 02:21:22 +02:00
|
|
|
# Needed for running tests:
|
2021-05-08 15:45:03 +02:00
|
|
|
, qtbase, xvfb-run
|
2018-04-28 02:21:22 +02:00
|
|
|
|
2019-12-28 16:12:10 +01:00
|
|
|
, python2, python3Packages
|
2018-04-28 02:21:22 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "kmymoney";
|
2021-01-30 10:54:07 +01:00
|
|
|
version = "5.1.1";
|
2018-04-28 02:21:22 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://kde/stable/kmymoney/${version}/src/${pname}-${version}.tar.xz";
|
2021-01-30 10:54:07 +01:00
|
|
|
sha256 = "sha256-33ufeOhZb5nSgpXKc4cI8GVe4Fd4nf2SHHsbq5ZXgpg=";
|
2018-04-28 02:21:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# Hidden dependency that wasn't included in CMakeLists.txt:
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2019-12-28 16:12:10 +01:00
|
|
|
doxygen extra-cmake-modules graphviz kdoctools python2
|
|
|
|
python3Packages.wrapPython wrapQtAppsHook
|
2018-04-28 02:21:22 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
|
|
|
|
kcontacts kdewebkit kdiagram kholidays kidentitymanagement kitemmodels
|
|
|
|
libical libofx qgpgme
|
2019-05-09 20:07:13 +02:00
|
|
|
sqlcipher
|
2018-04-28 02:21:22 +02:00
|
|
|
|
|
|
|
# Put it into buildInputs so that CMake can find it, even though we patch
|
|
|
|
# it into the interface later.
|
2019-10-29 09:25:10 +01:00
|
|
|
python3Packages.weboob
|
2018-04-28 02:21:22 +02:00
|
|
|
];
|
|
|
|
|
2019-10-29 09:25:10 +01:00
|
|
|
weboobPythonPath = [ python3Packages.weboob ];
|
2018-04-28 02:21:22 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
buildPythonPath "$weboobPythonPath"
|
|
|
|
patchPythonScript "$out/share/kmymoney/weboob/kmymoneyweboob.py"
|
|
|
|
|
|
|
|
# Within the embedded Python interpreter, sys.argv is unavailable, so let's
|
|
|
|
# assign it to a dummy value so that the assignment of sys.argv[0] injected
|
|
|
|
# by patchPythonScript doesn't fail:
|
|
|
|
sed -i -e '1i import sys; sys.argv = [""]' \
|
|
|
|
"$out/share/kmymoney/weboob/kmymoneyweboob.py"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
2021-05-08 15:45:03 +02:00
|
|
|
installCheckInputs = [ xvfb-run ];
|
2019-07-05 17:42:08 +02:00
|
|
|
installCheckPhase =
|
|
|
|
lib.optionalString doInstallCheck ''
|
2018-11-24 20:46:54 +01:00
|
|
|
xvfb-run -s '-screen 0 1024x768x24' make test \
|
2019-07-05 17:42:08 +02:00
|
|
|
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
|
|
|
|
'';
|
2018-04-28 02:21:22 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Personal finance manager for KDE";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://kmymoney.org/";
|
2018-04-28 02:21:22 +02:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
};
|
|
|
|
}
|