2021-09-04 20:05:03 +00:00
|
|
|
{ lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpg-error, pkg-config, gettext
|
2018-04-27 16:23:11 +00:00
|
|
|
, which
|
|
|
|
|
|
|
|
# GUI support
|
|
|
|
, gtk2, gtk3, qt5
|
2016-06-02 16:56:29 +00:00
|
|
|
|
|
|
|
, pluginSearchPaths ? [
|
|
|
|
"/run/current-system/sw/lib/gwenhywfar/plugins"
|
|
|
|
".nix-profile/lib/gwenhywfar/plugins"
|
|
|
|
]
|
|
|
|
}:
|
2012-01-08 19:29:07 +00:00
|
|
|
|
2018-04-27 15:10:59 +00:00
|
|
|
let
|
|
|
|
inherit ((import ./sources.nix).gwenhywfar) sha256 releaseId version;
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gwenhywfar";
|
2018-04-27 15:10:59 +00:00
|
|
|
inherit version;
|
2016-05-30 11:54:46 +00:00
|
|
|
|
2020-02-27 11:46:55 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz";
|
2016-06-02 16:17:04 +00:00
|
|
|
inherit sha256;
|
2012-01-08 19:29:07 +00:00
|
|
|
};
|
|
|
|
|
2018-04-27 16:23:11 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-openssl-includes=${openssl.dev}/include"
|
|
|
|
"--with-openssl-libs=${openssl.out}/lib"
|
|
|
|
];
|
|
|
|
|
2018-04-27 15:41:34 +00:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=("--with-guis=gtk2 gtk3 qt5")
|
|
|
|
'';
|
|
|
|
|
2016-06-02 14:29:16 +00:00
|
|
|
postPatch = let
|
|
|
|
isRelative = path: builtins.substring 0 1 path != "/";
|
|
|
|
mkSearchPath = path: ''
|
|
|
|
p; g; s,\<PLUGINDIR\>,"${path}",g;
|
2021-01-21 17:00:13 +00:00
|
|
|
'' + lib.optionalString (isRelative path) ''
|
2016-06-02 14:29:16 +00:00
|
|
|
s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g
|
|
|
|
'';
|
|
|
|
|
|
|
|
in ''
|
|
|
|
sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ {
|
|
|
|
/^#if/,/^#endif/ {
|
|
|
|
H; /^#endif/ {
|
2021-01-21 17:00:13 +00:00
|
|
|
${lib.concatMapStrings mkSearchPath pluginSearchPaths}
|
2016-06-02 14:29:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}' src/gwenhywfar.c
|
|
|
|
|
|
|
|
# Strip off the effective SO version from the path so that for example
|
|
|
|
# "lib/gwenhywfar/plugins/60" becomes just "lib/gwenhywfar/plugins".
|
|
|
|
sed -i -e '/^gwenhywfar_plugindir=/s,/\''${GWENHYWFAR_SO_EFFECTIVE},,' \
|
|
|
|
configure
|
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config gettext which ];
|
2012-01-08 19:29:07 +00:00
|
|
|
|
2021-09-04 20:05:03 +00:00
|
|
|
buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpg-error ];
|
2014-02-23 11:21:19 +00:00
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2014-02-23 11:21:19 +00:00
|
|
|
description = "OS abstraction functions used by aqbanking and related tools";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www2.aquamaniac.de/sites/download/packages.php?package=01&showall=1";
|
2014-02-23 11:44:18 +00:00
|
|
|
license = licenses.lgpl21;
|
2014-02-23 11:21:19 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2012-01-08 19:29:07 +00:00
|
|
|
}
|