From a79ea27f16b71853587a311ca4bf57bac5672f03 Mon Sep 17 00:00:00 2001 From: Joseph Lucas Date: Tue, 7 Sep 2021 12:17:53 +0200 Subject: [PATCH] taler-exchange: 0.8.1 -> unstable-2022-07-17 and taler-merchant: 0.8.0 -> unstable-2022-07-11 also add check phase --- .../networking/p2p/gnunet/default.nix | 2 +- .../applications/networking/taler/default.nix | 158 ++++++++++++------ .../networking/taler/exchange-fix-6665.patch | 48 ------ 3 files changed, 112 insertions(+), 96 deletions(-) delete mode 100644 pkgs/applications/networking/taler/exchange-fix-6665.patch diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix index 3b88ffb11d8..b5974694c54 100644 --- a/pkgs/applications/networking/p2p/gnunet/default.nix +++ b/pkgs/applications/networking/p2p/gnunet/default.nix @@ -3,7 +3,7 @@ , makeWrapper, ncurses, pkg-config, libxml2, sqlite, zlib , libpulseaudio, libopus, libogg, jansson, libsodium -, postgresqlSupport ? false, postgresql }: +, postgresqlSupport ? true, postgresql }: stdenv.mkDerivation rec { pname = "gnunet"; diff --git a/pkgs/applications/networking/taler/default.nix b/pkgs/applications/networking/taler/default.nix index c7ae7e40948..7119b0de4c9 100644 --- a/pkgs/applications/networking/taler/default.nix +++ b/pkgs/applications/networking/taler/default.nix @@ -1,58 +1,122 @@ -{ lib, stdenv, fetchurl, curl, gnunet, jansson, libgcrypt, libmicrohttpd -, qrencode, libsodium, libtool, pkg-config, postgresql, sqlite }: +{ lib, stdenv, fetchgit, curl, gnunet, jansson, libgcrypt, libmicrohttpd_0_9_72 +, qrencode, libsodium, libtool, libunistring, pkg-config, postgresql +, autoreconfHook, python39, recutils, wget, jq, gettext, texinfo +}: let - gnunet' = gnunet.override { postgresqlSupport = true; }; - - mkTaler = { pname, version, sha256 }: - extraAttrs: - stdenv.mkDerivation (extraAttrs // { - inherit pname version; - src = fetchurl { - url = "mirror://gnu/taler/${pname}-${version}.tar.gz"; - inherit sha256; - }; - enableParallelBuilding = true; - meta = with lib; { - broken = (stdenv.isLinux && stdenv.isAarch64); - description = "Anonymous, taxable payment system."; - homepage = "https://taler.net/"; - license = licenses.agpl3Plus; - maintainers = with maintainers; [ ehmry ]; - platforms = platforms.gnu ++ platforms.linux; - }; - }); + taler-merchant-backoffice = fetchgit { + url = "https://git.taler.net/merchant-backoffice.git"; + # branch "prebuilt" as of 2022-07-01 + rev = "1ef7150f32960cb65ebea67839cd5023f29a3d1d"; + sha256 = "sha256-ZtLYWHi6l5DxFvDm8RFGUD0BiAfJXCZr/ggrP3Uw7/0="; + }; in rec { - - taler-exchange = mkTaler { + taler-exchange = stdenv.mkDerivation rec { pname = "taler-exchange"; - version = "0.8.1"; - sha256 = "sha256-MPt3n1JXd0Y89b1qCuF6YxptSr7henfYp97JTq1Z+x4="; - } { - buildInputs = [ - curl - jansson - libgcrypt - libmicrohttpd - libsodium - libtool - postgresql - # sqlite + version = "unstable-2022-07-17"; + + src = fetchgit { + url = "https://git.taler.net/exchange.git"; + rev = "93b45e62eef254eae68bc119b9770e97bae2c9fa"; + fetchSubmodules = true; + sha256 = "sha256-BQxbwEf0wIkBOBVsPgMkMvUj4kFReXMUFTiSG0jXOJ0="; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config ]; - propagatedBuildInputs = [ gnunet' ]; - patches = [ ./exchange-fix-6665.patch ]; + buildInputs = [ + libgcrypt + libmicrohttpd_0_9_72 + jansson + libsodium + postgresql + curl + recutils + gettext + texinfo # Fix 'makeinfo' is missing on your system. + libunistring + python39.pkgs.jinja2 + ]; + propagatedBuildInputs = [ gnunet ]; + + configureFlags = [ "--with-gnunet=${gnunet}" ]; + preConfigure = '' + ./contrib/gana-update.sh + ''; + + enableParallelBuilding = true; + + checkInputs = [ wget curl ]; + doInstallCheck = true; + checkTarget = "check"; + + meta = with lib; { + description = '' + Taler is an electronic payment system providing the ability to pay + anonymously using digital cash. Taler consists of a network protocol + definition (using a RESTful API over HTTP), a Exchange (which creates + digital coins), a Wallet (which allows customers to manage, store and + spend digital coins), and a Merchant website which allows customers to + spend their digital coins. Naturally, each Merchant is different, but + Taler includes code examples to help Merchants integrate Taler as a + payment system. + ''; + homepage = "https://taler.net/"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ astro ]; + platforms = platforms.linux; + }; }; - taler-merchant = mkTaler { + taler-merchant = stdenv.mkDerivation rec { pname = "taler-merchant"; - version = "0.8.0"; - sha256 = "sha256-scrFLXeoQirGqhc+bSQKRl84PfUvjrp1uxF7pfOIB9Q="; - } { - nativeBuildInputs = [ pkg-config ]; - buildInputs = taler-exchange.buildInputs ++ [ qrencode taler-exchange ]; - propagatedBuildInputs = [ gnunet' ]; - PKG_CONFIG = "${pkg-config}/bin/pkg-config"; - }; + version = "unstable-2022-07-11"; + src = fetchgit { + url = "https://git.taler.net/merchant.git"; + rev = "60dcacf25e51cc2bff359ea1fc86cdd3d9e6083"; + sha256 = "sha256-Wn11z6YjnylZl3z2JjBlrtZ1KHfQUHLIYWo5F+mAmNo="; + }; + postUnpack = '' + ln -s ${taler-merchant-backoffice}/spa.html $sourceRoot/contrib/ + ''; + + nativeBuildInputs = [ pkg-config autoreconfHook ]; + buildInputs = taler-exchange.buildInputs ++ [ + qrencode + taler-exchange + # for ltdl.h + libtool + ]; + propagatedBuildInputs = [ gnunet ]; + + configureFlags = [ + "--with-gnunet=${gnunet}" + "--with-exchange=${taler-exchange}" + ]; + + enableParallelBuilding = true; + + checkInputs = [ jq ]; + doInstallCheck = true; + checkTarget = "check"; + + meta = with lib; { + description = '' + This is the GNU Taler merchant backend. It provides the logic that should run + at every GNU Taler merchant. The GNU Taler merchant is a RESTful backend that + can be used to setup orders and process payments. This component allows + merchants to receive payments without invading the customers' privacy. Of + course, this applies mostly for digital goods, as the merchant does not need + to know the customer's physical address. + ''; + homepage = "https://taler.net/"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ astro ]; + platforms = platforms.linux; + }; + }; } diff --git a/pkgs/applications/networking/taler/exchange-fix-6665.patch b/pkgs/applications/networking/taler/exchange-fix-6665.patch deleted file mode 100644 index e648123d269..00000000000 --- a/pkgs/applications/networking/taler/exchange-fix-6665.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit 9911b327ac299ec7eeae81b98cb520f4153071f2 -Author: Christian Grothoff -Date: Wed Dec 9 07:25:26 2020 +0100 - - fix #6665 - -diff --git a/src/testing/testing_api_cmd_rewind.c b/src/testing/testing_api_cmd_rewind.c -index e1b17fa9..979607cd 100644 ---- a/src/testing/testing_api_cmd_rewind.c -+++ b/src/testing/testing_api_cmd_rewind.c -@@ -24,7 +24,6 @@ - */ - #include "platform.h" - #include "taler_exchange_service.h" --#include "taler/taler_testing_lib.h" - #include "taler_testing_lib.h" - - -diff --git a/src/testing/testing_api_cmd_twister_exec_client.c b/src/testing/testing_api_cmd_twister_exec_client.c -index 2cb92a8f..b3903f29 100644 ---- a/src/testing/testing_api_cmd_twister_exec_client.c -+++ b/src/testing/testing_api_cmd_twister_exec_client.c -@@ -26,7 +26,7 @@ - */ - - #include "platform.h" --#include -+#include "taler_testing_lib.h" - #include "taler_twister_testing_lib.h" - - -diff --git a/src/testing/testing_api_trait_uuid.c b/src/testing/testing_api_trait_uuid.c -index c9b73a5b..4d5003ec 100644 ---- a/src/testing/testing_api_trait_uuid.c -+++ b/src/testing/testing_api_trait_uuid.c -@@ -22,9 +22,9 @@ - * @author Jonathan Buchanan - */ - #include "platform.h" --#include --#include --#include -+#include "taler_signatures.h" -+#include "taler_exchange_service.h" -+#include "taler_testing_lib.h" - - - #define TALER_TESTING_TRAIT_UUID "uuid"