diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aqbanking')
4 files changed, 147 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/default.nix b/nixpkgs/pkgs/development/libraries/aqbanking/default.nix new file mode 100644 index 000000000000..1e11661b0098 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchurl, gmp, gwenhywfar, libtool, libxml2, libxslt +, pkg-config, gettext, xmlsec, zlib +}: + +let + inherit ((import ./sources.nix).aqbanking) sha256 releaseId version; +in stdenv.mkDerivation rec { + pname = "aqbanking"; + inherit version; + + src = fetchurl { + url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz"; + inherit sha256; + }; + + # Set the include dir explicitly, this fixes a build error when building + # kmymoney because otherwise the includedir is overwritten by gwenhywfar's + # cmake file + postPatch = '' + sed -i '/^set_and_check(AQBANKING_INCLUDE_DIRS "@aqbanking_headerdir@")/i set_and_check(includedir "@includedir@")' aqbanking-config.cmake.in + sed -i -e '/^aqbanking_plugindir=/ { + c aqbanking_plugindir="\''${libdir}/gwenhywfar/plugins" + }' configure + ''; + + buildInputs = [ gmp gwenhywfar libtool libxml2 libxslt xmlsec zlib ]; + + nativeBuildInputs = [ pkg-config gettext ]; + + meta = with lib; { + description = "An interface to banking tasks, file formats and country information"; + homepage = "https://www.aquamaniac.de/"; + hydraPlatforms = []; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ goibhniu ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix new file mode 100644 index 000000000000..073ad3254a0b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix @@ -0,0 +1,69 @@ +{ lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpgerror, pkg-config, 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 { + pname = "gwenhywfar"; + inherit version; + + src = fetchurl { + url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz"; + 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; + '' + 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/ { + ${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 = [ pkg-config gettext which ]; + + buildInputs = [ gtk2 gtk3 qt5.qtbase gnutls openssl libgcrypt libgpgerror ]; + + dontWrapQtApps = true; + + meta = with 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix new file mode 100644 index 000000000000..f483f232e37b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, pkg-config, gwenhywfar, pcsclite, zlib }: + +let + inherit ((import ./sources.nix).libchipcard) sha256 releaseId version; +in stdenv.mkDerivation rec { + pname = "libchipcard"; + inherit version; + + src = fetchurl { + url = "https://www.aquamaniac.de/rdm/attachments/download/${releaseId}/${pname}-${version}.tar.gz"; + inherit sha256; + }; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ gwenhywfar pcsclite zlib ]; + + makeFlags = [ "crypttokenplugindir=$(out)/lib/gwenhywfar/plugins/ct" ]; + + configureFlags = [ "--with-gwen-dir=${gwenhywfar}" ]; + + meta = with lib; { + description = "Library for access to chipcards"; + homepage = "https://www.aquamaniac.de/rdm/projects/libchipcard"; + license = licenses.lgpl21; + maintainers = with maintainers; [ aszlig ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix new file mode 100644 index 000000000000..3713a257663c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix @@ -0,0 +1,11 @@ +{ + gwenhywfar.version = "5.4.1"; + gwenhywfar.sha256 = "16waq39mbhhjcma2ykdbqvpcw0ba3ksqqwsp55zczhg320s41zgv"; + gwenhywfar.releaseId = "344"; + libchipcard.version = "5.0.4"; + libchipcard.sha256 = "0fj2h39ll4kiv28ch8qgzdbdbnzs8gl812qnm660bw89rynpjnnj"; + libchipcard.releaseId = "158"; + aqbanking.version = "6.2.5"; + aqbanking.sha256 = "1pyny15g8y5dzzl4yg7jjnavygfzsi2g1jl7as9grqy77q70cnyg"; + aqbanking.releaseId = "342"; +} |