merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 38b70b1cc11111723304169e317f5c0792a64e5f
parent c72d46eb376bf66eccc7beb0f1e3b4f7ffcecf5a
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sun, 12 Apr 2026 22:03:34 +0200

nix: add documentation to nix flake

Diffstat:
Mbootstrap | 9++++++---
Mflake.lock | 317++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mflake.nix | 42++++++++++++++++++++++++++++++++++++------
3 files changed, 356 insertions(+), 12 deletions(-)

diff --git a/bootstrap b/bootstrap @@ -14,13 +14,16 @@ fi # Make sure that "git pull" et al. also update # submodules to avoid accidental rollbacks. -git config --local submodule.recurse true +if [ -d .git ]; then + git config --local submodule.recurse true +fi echo "$0: Updating submodules" # Caution: We do NOT want to fetch the latest version with --remote, # but instead always the one that's recorded in the repository. -echo | git submodule update --init --force - +if [ -d .git ]; then + echo | git submodule update --init --force +fi ./contrib/check-prebuilt diff --git a/flake.lock b/flake.lock @@ -1,5 +1,71 @@ { "nodes": { + "donau": { + "inputs": { + "exchange": "exchange", + "gnunet": "gnunet_2", + "nixpkgs": "nixpkgs_4", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1776021432, + "narHash": "sha256-1m58bz3UwCDKAv38dFXUXNf4wJzYfwxZh8JC0Ci0hmw=", + "ref": "refs/heads/master", + "rev": "7f6a8e87852b491aaf74874438cc938f3c0c04d7", + "revCount": 1049, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/donau" + }, + "original": { + "type": "git", + "url": "https://git.gnunet.org/donau" + } + }, + "exchange": { + "inputs": { + "gnunet": "gnunet", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1776020637, + "narHash": "sha256-U/KHaAaE/JrlS3RYbRRiRRe0ur2JACkKysevCrzCXYY=", + "ref": "refs/heads/master", + "rev": "1b474b461597d11382e4e036520259a96f254e9b", + "revCount": 9931, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/exchange" + }, + "original": { + "rev": "1b474b461597d11382e4e036520259a96f254e9b", + "type": "git", + "url": "https://git.gnunet.org/exchange" + } + }, + "exchange_2": { + "inputs": { + "gnunet": "gnunet_3", + "nixpkgs": "nixpkgs_6", + "systems": "systems_6" + }, + "locked": { + "lastModified": 1776021477, + "narHash": "sha256-V6qYPCNgaalQi6tRkDZ+Per3PPifm1Ze2pShV6LGomg=", + "ref": "refs/heads/master", + "rev": "92da4e81006404494f6443781c8f55249e723847", + "revCount": 9932, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/exchange" + }, + "original": { + "rev": "92da4e81006404494f6443781c8f55249e723847", + "type": "git", + "url": "https://git.gnunet.org/exchange" + } + }, "gnunet": { "inputs": { "nixpkgs": "nixpkgs", @@ -21,6 +87,69 @@ "url": "https://git.gnunet.org/gnunet" } }, + "gnunet_2": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1774899416, + "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=", + "ref": "refs/heads/master", + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "revCount": 33194, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/gnunet" + }, + "original": { + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "type": "git", + "url": "https://git.gnunet.org/gnunet" + } + }, + "gnunet_3": { + "inputs": { + "nixpkgs": "nixpkgs_5", + "systems": "systems_5" + }, + "locked": { + "lastModified": 1774899416, + "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=", + "ref": "refs/heads/master", + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "revCount": 33194, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/gnunet" + }, + "original": { + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "type": "git", + "url": "https://git.gnunet.org/gnunet" + } + }, + "gnunet_4": { + "inputs": { + "nixpkgs": "nixpkgs_7", + "systems": "systems_7" + }, + "locked": { + "lastModified": 1774899416, + "narHash": "sha256-YcGma1gX/t76xDv9DW71nKkWFhzXYz3NkN/WEceHbZM=", + "ref": "refs/heads/master", + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "revCount": 33194, + "submodules": true, + "type": "git", + "url": "https://git.gnunet.org/gnunet" + }, + "original": { + "rev": "7c6b613e37e301b0e81fb94af5878d00c98e5b75", + "type": "git", + "url": "https://git.gnunet.org/gnunet" + } + }, "nixpkgs": { "locked": { "lastModified": 1774799055, @@ -38,6 +167,96 @@ }, "nixpkgs_2": { "locked": { + "lastModified": 1774799055, + "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1774799055, + "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1775825553, + "narHash": "sha256-LH0FGBWngFpvqXYfN1eks+L5n3aXy1ALTTRRhxP0HGA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ca62ee54d15571e3122309abb6740578906bcdf7", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1774799055, + "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1774799055, + "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1774799055, + "narHash": "sha256-Tsq9BCz0q47ej1uFF39m4tuhcwru/ls6vCCJzutEpaw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "107cba9eb4a8d8c9f8e9e61266d78d340867913a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "release-25.11", + "type": "indirect" + } + }, + "nixpkgs_8": { + "locked": { "lastModified": 1775730577, "narHash": "sha256-5i3MKmxBFQP9/wp3QyFWyS7DqURq/M4T8gr1JSbyygI=", "owner": "NixOS", @@ -53,9 +272,11 @@ }, "root": { "inputs": { - "gnunet": "gnunet", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" + "donau": "donau", + "exchange": "exchange_2", + "gnunet": "gnunet_4", + "nixpkgs": "nixpkgs_8", + "systems": "systems_8" } }, "systems": { @@ -87,6 +308,96 @@ "repo": "default", "type": "github" } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_8": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix @@ -1,12 +1,35 @@ +# This is a nix flake. To use it, you need nix (with flake support) installed. +# If you do not have nix and do not intend to use it, you can ignore this file. +# Why should you use it? Using this flake will allow you to enter a developer shell +# which has all necessary packages for this repository already installed. +# The shell will allow you to code against the specific revisions of the dependencies +# pinned in this file. +# This is useful when git HEAD of your dependencies already contains breaking changes +# you should not (yet) code against. +# OTOH, if you should code against a newer, not yet released revision, you can specify +# this revision in this file. +# You can use this file in three ways: +# 1. Build: $ nix build +# this will build the package (it runs make for you in an environment with the dependencies installed) +# 2. Develop: $ nix develop +# This will drop you inside a shell in which you can develop and compile (and test) your code. +# It even starts and sets up the test database for you. +# 3. Use this repository in a new project +# Should you create a new project that depends on this project you are in luck. You can create a flake.nix +# in your repository and include this packages as a dependency just like the dependencies of this package are +# included here. + { inputs = { nixpkgs.url = "nixpkgs/release-25.11"; systems.url = "github:nix-systems/default"; gnunet.url = "git+https://git.gnunet.org/gnunet?rev=7c6b613e37e301b0e81fb94af5878d00c98e5b75"; + exchange.url = "git+https://git.gnunet.org/exchange?rev=92da4e81006404494f6443781c8f55249e723847"; + donau.url = "git+https://git.gnunet.org/donau"; self.submodules = true; }; - outputs = { self, nixpkgs, gnunet, systems, ... } @ inputs: + outputs = { self, nixpkgs, gnunet, exchange, donau, systems, ... } @ inputs: let supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; forEachSystem = nixpkgs.lib.genAttrs supportedSystems; @@ -20,18 +43,22 @@ let pkgs = nixpkgsFor.${system}; gnunetpkgs = gnunet.packages.${system}; + exchangepkgs = exchange.packages.${system}; + donaupkgs = donau.packages.${system}; in { - gnunet = pkgs.stdenv.mkDerivation { + merchant = pkgs.stdenv.mkDerivation { name = "merchant"; src = ./.; nativeBuildInputs = [ pkgs.gnumake - pkgs.automake - pkgs.autoconf + pkgs.meson + pkgs.ninja pkgs.pkg-config pkgs.python3 pkgs.texinfo - ]; + pkgs.typst + pkgs.pdftk + ]; buildInputs = [ pkgs.libtool pkgs.jansson @@ -47,7 +74,10 @@ pkgs.libunistring pkgs.curlWithGnuTls pkgs.jq + pkgs.qrencode gnunetpkgs.gnunet + exchangepkgs.exchange + donaupkgs.donau ]; preConfigure = '' patchShebangs --build contrib/check-prebuilt @@ -56,7 +86,7 @@ }; } ); - defaultPackage = forEachSystem (system: self.packages.${system}.gnunet); + defaultPackage = forEachSystem (system: self.packages.${system}.merchant); # This defines a development shell in which you can compile # (and use) exchange devShells = forEachSystem