2018-04-28 01:21:22 +01:00
|
|
|
{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
|
2019-07-05 16:42:08 +01:00
|
|
|
, wrapQtAppsHook
|
2018-04-28 01:21:22 +01:00
|
|
|
|
|
|
|
, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
|
|
|
|
, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
|
|
|
|
, kitemmodels, libical, libofx, qgpgme
|
|
|
|
|
2019-05-09 19:07:13 +01:00
|
|
|
, sqlcipher
|
|
|
|
|
2018-04-28 01:21:22 +01:00
|
|
|
# Needed for running tests:
|
|
|
|
, qtbase, xvfb_run
|
|
|
|
|
|
|
|
# For weboob, which only supports Python 2.x:
|
|
|
|
, python2Packages
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "kmymoney";
|
2019-07-15 20:32:45 +01:00
|
|
|
version = "5.0.5";
|
2018-04-28 01:21:22 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://kde/stable/kmymoney/${version}/src/${pname}-${version}.tar.xz";
|
2019-07-15 20:32:45 +01:00
|
|
|
sha256 = "1hghs4676kn2giwpwz1y7p6djpmi41x64idf3ybiz8ky14a5s977";
|
2018-04-28 01:21:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Hidden dependency that wasn't included in CMakeLists.txt:
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
doxygen extra-cmake-modules graphviz kdoctools python2Packages.wrapPython
|
2019-07-05 16:42:08 +01:00
|
|
|
wrapQtAppsHook
|
2018-04-28 01:21:22 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
|
|
|
|
kcontacts kdewebkit kdiagram kholidays kidentitymanagement kitemmodels
|
|
|
|
libical libofx qgpgme
|
2019-05-09 19:07:13 +01:00
|
|
|
sqlcipher
|
2018-04-28 01:21:22 +01:00
|
|
|
|
|
|
|
# Put it into buildInputs so that CMake can find it, even though we patch
|
|
|
|
# it into the interface later.
|
|
|
|
python2Packages.weboob
|
|
|
|
];
|
|
|
|
|
|
|
|
weboobPythonPath = [ python2Packages.weboob ];
|
|
|
|
|
|
|
|
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;
|
2018-11-24 19:46:54 +00:00
|
|
|
installCheckInputs = [ xvfb_run ];
|
2019-07-05 16:42:08 +01:00
|
|
|
installCheckPhase =
|
|
|
|
lib.optionalString doInstallCheck ''
|
2018-11-24 19:46:54 +00:00
|
|
|
xvfb-run -s '-screen 0 1024x768x24' make test \
|
2019-07-05 16:42:08 +01:00
|
|
|
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
|
|
|
|
'';
|
2018-04-28 01:21:22 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Personal finance manager for KDE";
|
|
|
|
homepage = https://kmymoney.org/;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2Plus;
|
2019-10-07 16:20:23 +01:00
|
|
|
broken = true;
|
2018-04-28 01:21:22 +01:00
|
|
|
};
|
|
|
|
}
|