2024-04-27 10:43:57 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchgit,
|
|
|
|
gnunet,
|
|
|
|
qrencode,
|
|
|
|
taler-exchange,
|
2024-08-29 15:08:28 +02:00
|
|
|
taler-wallet-core,
|
2024-04-27 10:43:57 +02:00
|
|
|
libtool,
|
|
|
|
pkg-config,
|
|
|
|
autoreconfHook,
|
2024-08-08 13:51:38 +02:00
|
|
|
makeWrapper,
|
2024-04-27 10:43:57 +02:00
|
|
|
jq,
|
|
|
|
}:
|
|
|
|
|
2024-08-29 15:10:54 +02:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-04-27 10:43:57 +02:00
|
|
|
pname = "taler-merchant";
|
2024-08-29 15:08:28 +02:00
|
|
|
version = "0.13.0";
|
2024-04-27 10:43:57 +02:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.taler.net/merchant.git";
|
2024-08-29 15:10:54 +02:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-04-27 10:43:57 +02:00
|
|
|
fetchSubmodules = true;
|
2024-08-29 15:08:28 +02:00
|
|
|
hash = "sha256-N3atOOE21OEks3G1LPOM5qo/kq0D5D9gmTfURCBZx6M=";
|
2024-04-27 10:43:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
ln -s ${taler-wallet-core}/spa.html $sourceRoot/contrib/
|
|
|
|
'';
|
|
|
|
|
2024-08-08 13:51:38 +02:00
|
|
|
# Use an absolute path for `templates` and `spa` directories, else a relative
|
|
|
|
# path to the `taler-exchange` package is used.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/backend/taler-merchant-httpd.c \
|
|
|
|
--replace-fail 'TALER_TEMPLATING_init ("merchant");' "TALER_TEMPLATING_init_path (\"merchant\", \"$out/share/taler\");"
|
|
|
|
|
|
|
|
substituteInPlace src/backend/taler-merchant-httpd_spa.c \
|
|
|
|
--replace-fail 'GNUNET_DISK_directory_scan (dn,' "GNUNET_DISK_directory_scan (\"$out/share/taler/merchant/spa/\","
|
|
|
|
'';
|
|
|
|
|
2024-04-27 10:43:57 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
autoreconfHook
|
2024-08-08 13:51:38 +02:00
|
|
|
makeWrapper
|
2024-04-27 10:43:57 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = taler-exchange.buildInputs ++ [
|
|
|
|
qrencode
|
|
|
|
taler-exchange
|
|
|
|
# for ltdl.h
|
|
|
|
libtool
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ gnunet ];
|
|
|
|
|
|
|
|
# From ./bootstrap
|
|
|
|
preAutoreconf = ''
|
|
|
|
pushd contrib
|
|
|
|
find wallet-core/backoffice/ -type f -printf ' %p \\\n' | sort > Makefile.am.ext
|
|
|
|
truncate -s -2 Makefile.am.ext
|
|
|
|
cat Makefile.am.in Makefile.am.ext >> Makefile.am
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2024-08-08 13:51:38 +02:00
|
|
|
# NOTE: The executables that need database access fail to detect the
|
|
|
|
# postgresql library in `$out/lib/taler`, so we need to wrap them.
|
|
|
|
postInstall = ''
|
|
|
|
for exec in dbinit httpd webhook wirewatch depositcheck exchange; do
|
|
|
|
wrapProgram $out/bin/taler-merchant-$exec \
|
|
|
|
--prefix LD_LIBRARY_PATH : "$out/lib/taler"
|
|
|
|
done
|
|
|
|
'';
|
2024-04-27 10:43:57 +02:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
nativeCheckInputs = [ jq ];
|
|
|
|
|
|
|
|
checkTarget = "check";
|
|
|
|
|
2024-08-29 15:10:54 +02:00
|
|
|
meta = {
|
2024-04-27 10:43:57 +02:00
|
|
|
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/";
|
2024-06-16 22:48:03 +02:00
|
|
|
changelog = "https://git.taler.net/merchant.git/tree/ChangeLog";
|
2024-08-29 15:10:54 +02:00
|
|
|
license = lib.licenses.agpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ astro ];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-04-27 10:43:57 +02:00
|
|
|
};
|
2024-08-29 15:10:54 +02:00
|
|
|
})
|