diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix new file mode 100644 index 000000000000..bb337e471cfc --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix @@ -0,0 +1,71 @@ +{ stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpgerror, pkgconfig, gettext +, which + +# GUI support +, gtk2, gtk3, qt5 + +, pluginSearchPaths ? [ + "/run/current-system/sw/lib/gwenhywfar/plugins" + ".nix-profile/lib/gwenhywfar/plugins" + ] +}: + +let + inherit ((import ./sources.nix).gwenhywfar) sha256 releaseId version; +in stdenv.mkDerivation rec { + name = "gwenhywfar-${version}"; + inherit version; + + src = let + qstring = "package=01&release=${releaseId}&file=02"; + mkURLs = map (base: "${base}/sites/download/download.php?${qstring}"); + in fetchurl { + name = "${name}.tar.gz"; + urls = mkURLs [ "http://www.aquamaniac.de" "http://www2.aquamaniac.de" ]; + inherit sha256; + }; + + configureFlags = [ + "--with-openssl-includes=${openssl.dev}/include" + "--with-openssl-libs=${openssl.out}/lib" + ]; + + preConfigure = '' + configureFlagsArray+=("--with-guis=gtk2 gtk3 qt5") + ''; + + postPatch = let + isRelative = path: builtins.substring 0 1 path != "/"; + mkSearchPath = path: '' + p; g; s,\<PLUGINDIR\>,"${path}",g; + '' + stdenv.lib.optionalString (isRelative path) '' + s/AddPath(\(.*\));/AddRelPath(\1, GWEN_PathManager_RelModeHome);/g + ''; + + in '' + sed -i -e '/GWEN_PathManager_DefinePath.*GWEN_PM_PLUGINDIR/,/^#endif/ { + /^#if/,/^#endif/ { + H; /^#endif/ { + ${stdenv.lib.concatMapStrings mkSearchPath pluginSearchPaths} + } + } + }' 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 + ''; + + nativeBuildInputs = [ pkgconfig gettext which ]; + + buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpgerror ]; + + meta = with stdenv.lib; { + description = "OS abstraction functions used by aqbanking and related tools"; + homepage = http://www2.aquamaniac.de/sites/download/packages.php?package=01&showall=1; + license = licenses.lgpl21; + maintainers = with maintainers; [ goibhniu ]; + platforms = platforms.linux; + }; +} |