diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aqbanking')
4 files changed, 145 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..c206630b57b0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, gmp, gwenhywfar, libtool, libxml2, libxslt +, pkgconfig, 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 = [ pkgconfig gettext ]; + + meta = with stdenv.lib; { + description = "An interface to banking tasks, file formats and country information"; + homepage = "http://www2.aquamaniac.de/sites/download/packages.php?package=03&showall=1"; + 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..4c5192574d86 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix @@ -0,0 +1,67 @@ +{ 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 { + 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; + '' + 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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix new file mode 100644 index 000000000000..0e01480a4bdf --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, 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 = [ pkgconfig ]; + + buildInputs = [ gwenhywfar pcsclite zlib ]; + + makeFlags = [ "crypttokenplugindir=$(out)/lib/gwenhywfar/plugins/ct" ]; + + configureFlags = [ "--with-gwen-dir=${gwenhywfar}" ]; + + meta = with stdenv.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..8016053c42de --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix @@ -0,0 +1,11 @@ +{ + gwenhywfar.version = "5.1.3"; + gwenhywfar.sha256 = "0xjr9d94y46h7pfdhz5ygn01pmlm66rhiybr520h13nvjh4zid0r"; + gwenhywfar.releaseId = "242"; + libchipcard.version = "5.0.4"; + libchipcard.sha256 = "0fj2h39ll4kiv28ch8qgzdbdbnzs8gl812qnm660bw89rynpjnnj"; + libchipcard.releaseId = "158"; + aqbanking.version = "6.0.2"; + aqbanking.sha256 = "0n41n3yki1wmax4i9wi485g8zqb43z1adywcixzfq9gbdjhz05hx"; + aqbanking.releaseId = "273"; +} |