1 { lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpg-error, pkg-config, gettext
7 , pluginSearchPaths ? [
8 "/run/current-system/sw/lib/gwenhywfar/plugins"
9 ".nix-profile/lib/gwenhywfar/plugins"
14 inherit ((import ./sources.nix).gwenhywfar) hash releaseId version;
15 in stdenv.mkDerivation rec {
20 url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
25 "--with-openssl-includes=${openssl.dev}/include"
26 "--with-openssl-libs=${lib.getLib openssl}/lib"
30 configureFlagsArray+=("--with-guis=gtk2 gtk3 qt5")
34 isRelative = path: builtins.substring 0 1 path != "/";
35 mkSearchPath = path: ''
36 p; g; s,\<PLUGINDIR\>,"${path}",g;
37 '' + lib.optionalString (isRelative path) ''
38 s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g
42 sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ {
45 ${lib.concatMapStrings mkSearchPath pluginSearchPaths}
50 # Strip off the effective SO version from the path so that for example
51 # "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins".
52 sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \
56 nativeBuildInputs = [ pkg-config gettext which ];
58 buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpg-error ];
60 dontWrapQtApps = true;
63 description = "OS abstraction functions used by aqbanking and related tools";
64 homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar";
65 license = licenses.lgpl21Plus;
66 maintainers = with maintainers; [ goibhniu ];
67 platforms = platforms.linux;