2018-04-28 00:21:22 +00:00
|
|
|
{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
|
2019-07-05 15:42:08 +00:00
|
|
|
, wrapQtAppsHook
|
2022-08-03 12:59:06 +00:00
|
|
|
, autoPatchelfHook
|
2018-04-28 00:21:22 +00:00
|
|
|
|
|
|
|
, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
|
2022-11-19 18:17:51 +00:00
|
|
|
, kcmutils, kcontacts, qtwebengine, kdiagram, kholidays, kidentitymanagement
|
2018-04-28 00:21:22 +00:00
|
|
|
, kitemmodels, libical, libofx, qgpgme
|
|
|
|
|
2019-05-09 18:07:13 +00:00
|
|
|
, sqlcipher
|
|
|
|
|
2018-04-28 00:21:22 +00:00
|
|
|
# Needed for running tests:
|
2021-11-13 22:28:25 +00:00
|
|
|
, xvfb-run
|
2018-04-28 00:21:22 +00:00
|
|
|
|
2022-08-03 12:59:06 +00:00
|
|
|
, python3
|
2018-04-28 00:21:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "kmymoney";
|
2022-08-03 12:59:06 +00:00
|
|
|
version = "5.1.3";
|
2018-04-28 00:21:22 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://kde/stable/kmymoney/${version}/src/${pname}-${version}.tar.xz";
|
2022-08-03 12:59:06 +00:00
|
|
|
sha256 = "sha256-OTi4B4tzkboy4Su0I5di+uE0aDoMLsGnUQXDAso+Xj8=";
|
2018-04-28 00:21:22 +00:00
|
|
|
};
|
|
|
|
|
2022-11-19 18:17:51 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
# Remove this when upgrading to a KMyMoney release that includes
|
|
|
|
# https://invent.kde.org/office/kmymoney/-/merge_requests/118
|
|
|
|
"-DENABLE_WEBENGINE=ON"
|
|
|
|
];
|
|
|
|
|
2018-04-28 00:21:22 +00:00
|
|
|
# Hidden dependency that wasn't included in CMakeLists.txt:
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
|
2018-04-28 00:21:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-08-03 12:59:06 +00:00
|
|
|
doxygen extra-cmake-modules graphviz kdoctools
|
|
|
|
python3.pkgs.wrapPython wrapQtAppsHook autoPatchelfHook
|
2018-04-28 00:21:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
|
2022-11-19 18:17:51 +00:00
|
|
|
kcontacts qtwebengine kdiagram kholidays kidentitymanagement kitemmodels
|
2018-04-28 00:21:22 +00:00
|
|
|
libical libofx qgpgme
|
2019-05-09 18:07:13 +00:00
|
|
|
sqlcipher
|
2018-04-28 00:21:22 +00:00
|
|
|
|
|
|
|
# Put it into buildInputs so that CMake can find it, even though we patch
|
|
|
|
# it into the interface later.
|
2022-08-03 12:59:06 +00:00
|
|
|
python3.pkgs.woob
|
2018-04-28 00:21:22 +00:00
|
|
|
];
|
|
|
|
|
2022-08-03 12:59:06 +00:00
|
|
|
postPatch = ''
|
|
|
|
buildPythonPath "${python3.pkgs.woob}"
|
|
|
|
patchPythonScript "kmymoney/plugins/woob/interface/kmymoneywoob.py"
|
2018-04-28 00:21:22 +00:00
|
|
|
|
|
|
|
# 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 = [""]' \
|
2022-08-03 12:59:06 +00:00
|
|
|
"kmymoney/plugins/woob/interface/kmymoneywoob.py"
|
2018-04-28 00:21:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeInstallCheckInputs = [ xvfb-run ];
|
2019-07-05 15:42:08 +00:00
|
|
|
installCheckPhase =
|
|
|
|
lib.optionalString doInstallCheck ''
|
2018-11-24 19:46:54 +00:00
|
|
|
xvfb-run -s '-screen 0 1024x768x24' make test \
|
2019-07-05 15:42:08 +00:00
|
|
|
ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
|
|
|
|
'';
|
2018-04-28 00:21:22 +00:00
|
|
|
|
2022-08-03 12:59:06 +00:00
|
|
|
# libpython is required by the python interpreter embedded in kmymoney, so we
|
|
|
|
# need to explicitly tell autoPatchelf about it.
|
|
|
|
postFixup = ''
|
|
|
|
patchelf --debug --add-needed libpython${python3.pythonVersion}.so \
|
|
|
|
"$out/bin/.kmymoney-wrapped"
|
|
|
|
'';
|
|
|
|
|
2018-04-28 00:21:22 +00:00
|
|
|
meta = {
|
|
|
|
description = "Personal finance manager for KDE";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://kmymoney.org/";
|
2018-04-28 00:21:22 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2Plus;
|
2022-08-03 12:59:06 +00:00
|
|
|
maintainers = with lib.maintainers; [ aidalgol das-g ];
|
2018-04-28 00:21:22 +00:00
|
|
|
};
|
|
|
|
}
|