taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit 13b4074969a156b72bb48b4818df5c29bb383cf3
parent 52d00c91bb5bcada014300ae62e0a440f95f8503
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sun, 29 Mar 2026 14:53:57 +0200

add nix flake

Diffstat:
Aflake.lock | 43+++++++++++++++++++++++++++++++++++++++++++
Aflake.nix | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+), 0 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1774386573, + "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "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", + "version": 7 +} diff --git a/flake.nix b/flake.nix @@ -0,0 +1,56 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + systems.url = "github:nix-systems/default"; + self.submodules = true; + }; + + outputs = { self, nixpkgs, systems, ... } @ inputs: + let + supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + forEachSystem = nixpkgs.lib.genAttrs supportedSystems; + nixpkgsFor = forEachSystem (system: import nixpkgs { inherit system; }); + in + { + # This defines (installable) package derivations + # For use in flakes that use this flake as input in order + # to specify/use gnunet from git as a dependency + packages = forEachSystem (system: + let + pkgs = nixpkgsFor.${system}; + in { + gnunet = pkgs.stdenv.mkDerivation { + name = "taler-directory"; + src = ./.; + buildInputs = [ + pkgs.gnumake + pkgs.go + ]; + preConfigure = '' + ./bootstrap + ''; + }; + } + ); + defaultPackage = forEachSystem (system: self.packages.${system}.gnunet); + # This defines a development shell in which you can compile + # (and use) gnunet + devShells = forEachSystem + (system: + let + pkgs = nixpkgsFor.${system}; + in + { + default = pkgs.mkShell { + packages = [ + pkgs.gnumake + pkgs.go + ]; + + shellHook = '' + echo "TalDir environment loaded." + ''; + }; + }); + }; +}