about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/aqbanking
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/aqbanking')
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/default.nix38
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix69
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix27
-rw-r--r--nixpkgs/pkgs/development/libraries/aqbanking/sources.nix22
4 files changed, 156 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..102703107c48
--- /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) hash 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 hash;
+  };
+
+  # 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/rdm/";
+    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..4f2326b007a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/gwenhywfar.nix
@@ -0,0 +1,69 @@
+{ lib, stdenv, fetchurl, gnutls, openssl, libgcrypt, libgpg-error, pkg-config, gettext
+, which
+
+# GUI support
+, gtk3, qt5
+
+, pluginSearchPaths ? [
+    "/run/current-system/sw/lib/gwenhywfar/plugins"
+    ".nix-profile/lib/gwenhywfar/plugins"
+  ]
+}:
+
+let
+  inherit ((import ./sources.nix).gwenhywfar) hash 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 hash;
+  };
+
+  configureFlags = [
+    "--with-openssl-includes=${openssl.dev}/include"
+    "--with-openssl-libs=${lib.getLib openssl}/lib"
+  ];
+
+  preConfigure = ''
+    configureFlagsArray+=("--with-guis=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 = [ gtk3 qt5.qtbase gnutls openssl libgcrypt libgpg-error ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "OS abstraction functions used by aqbanking and related tools";
+    homepage = "https://www.aquamaniac.de/rdm/projects/gwenhywfar";
+    license = licenses.lgpl21Plus;
+    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..9190e1ad9b79
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/libchipcard.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, gwenhywfar, pcsclite, zlib }:
+
+let
+  inherit ((import ./sources.nix).libchipcard) hash 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 hash;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gwenhywfar pcsclite zlib ];
+
+  makeFlags = [ "crypttokenplugindir=$(out)/lib/gwenhywfar/plugins/ct" ];
+
+  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..61632662122d
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/aqbanking/sources.nix
@@ -0,0 +1,22 @@
+{
+  # https://www.aquamaniac.de/rdm/projects/gwenhywfar/files
+  gwenhywfar = {
+    version = "5.10.1";
+    hash = "sha256-ovYKnd5don5X4OXvX4kx9JXB1UGtkKhB4rYjFWVUcWA=";
+    releaseId = "465";
+  };
+
+  # https://www.aquamaniac.de/rdm/projects/libchipcard/files
+  libchipcard = {
+    version = "5.1.6";
+    hash = "sha256-bAf1J0F/dWIHT5kBLaTRHrTbr9M/SeZrRCzNbjuM/SA=";
+    releaseId = "382";
+  };
+
+  # https://www.aquamaniac.de/rdm/projects/aqbanking/files
+  aqbanking = {
+    version = "6.5.4";
+    hash = "sha256-DRbOrnbwcY5GZjj0VHqLFJJ/HY2YMiB5zWSBrd4wrJk=";
+    releaseId = "499";
+  };
+}