commit 7f6a8e87852b491aaf74874438cc938f3c0c04d7
parent 615b800bfe0d3c5fe6ee72d7d49bfbb9204a9bb8
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Sun, 12 Apr 2026 21:17:12 +0200
nix: use pinned exchange in nix develop
Diffstat:
| M | bootstrap | | | 4 | +++- |
| M | flake.lock | | | 110 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- |
| M | flake.nix | | | 17 | ++++++++++------- |
3 files changed, 120 insertions(+), 11 deletions(-)
diff --git a/bootstrap b/bootstrap
@@ -9,7 +9,9 @@ if ! git --version >/dev/null; then
fi
echo "$0: Updating submodules"
-git submodule update --init --force
+if [ -d .git ]; then
+ git submodule update --init --force
+fi
# This is more portable than `which' but comes with
# the caveat of not(?) properly working on busybox's ash:
diff --git a/flake.lock b/flake.lock
@@ -1,5 +1,27 @@
{
"nodes": {
+ "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"
+ }
+ },
"gnunet": {
"inputs": {
"nixpkgs": "nixpkgs",
@@ -21,6 +43,27 @@
"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"
+ }
+ },
"nixpkgs": {
"locked": {
"lastModified": 1774799055,
@@ -38,6 +81,36 @@
},
"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",
@@ -53,9 +126,10 @@
},
"root": {
"inputs": {
- "gnunet": "gnunet",
- "nixpkgs": "nixpkgs_2",
- "systems": "systems_2"
+ "exchange": "exchange",
+ "gnunet": "gnunet_2",
+ "nixpkgs": "nixpkgs_4",
+ "systems": "systems_4"
}
},
"systems": {
@@ -87,6 +161,36 @@
"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"
+ }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
@@ -3,10 +3,11 @@
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=1b474b461597d11382e4e036520259a96f254e9b";
self.submodules = true;
};
- outputs = { self, nixpkgs, gnunet, systems, ... } @ inputs:
+ outputs = { self, nixpkgs, gnunet, exchange, systems, ... } @ inputs:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forEachSystem = nixpkgs.lib.genAttrs supportedSystems;
@@ -20,14 +21,15 @@
let
pkgs = nixpkgsFor.${system};
gnunetpkgs = gnunet.packages.${system};
+ exchangepkgs = exchange.packages.${system};
in {
- gnunet = pkgs.stdenv.mkDerivation {
+ donau = pkgs.stdenv.mkDerivation {
name = "donau";
src = ./.;
nativeBuildInputs = [
pkgs.gnumake
- pkgs.automake
- pkgs.autoconf
+ pkgs.meson
+ pkgs.ninja
pkgs.pkg-config
pkgs.python3
pkgs.texinfo
@@ -48,6 +50,7 @@
pkgs.curlWithGnuTls
pkgs.jq
gnunetpkgs.gnunet
+ exchangepkgs.exchange
];
preConfigure = ''
patchShebangs --build contrib/check-prebuilt
@@ -56,7 +59,7 @@
};
}
);
- defaultPackage = forEachSystem (system: self.packages.${system}.gnunet);
+ defaultPackage = forEachSystem (system: self.packages.${system}.donau);
# This defines a development shell in which you can compile
# (and use) exchange
devShells = forEachSystem
@@ -64,6 +67,7 @@
let
pkgs = nixpkgsFor.${system};
gnunetpkgs = gnunet.packages.${system};
+ exchangepkgs = exchange.packages.${system};
in
{
default = pkgs.mkShell {
@@ -91,9 +95,8 @@
pkgs.codespell
pkgs.clang-tools
pkgs.uncrustify
- pkgs.typst # optional
- pkgs.pdftk # optional
pkgs.doxygen
+ exchangepkgs.exchange
];
shellHook = ''