taler-mailbox

Service for asynchronous wallet-to-wallet payment messages
Log | Files | Refs | Submodules | README | LICENSE

flake.nix (1614B)


      1 {
      2   inputs = {
      3     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
      4     systems.url = "github:nix-systems/default";
      5     self.submodules = true;
      6   };
      7 
      8   outputs = { self, nixpkgs, systems, ... } @ inputs:
      9     let
     10       supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
     11       forEachSystem = nixpkgs.lib.genAttrs supportedSystems;
     12       nixpkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
     13     in
     14     {
     15       # This defines (installable) package derivations
     16       # For use in flakes that use this flake as input in order
     17       # to specify/use gnunet from git as a dependency
     18       packages = forEachSystem (system:
     19         let
     20           pkgs = nixpkgsFor.${system};
     21         in {
     22           gnunet = pkgs.stdenv.mkDerivation {
     23             name = "taler-mailbox";
     24             src = ./.;
     25             buildInputs = [
     26               pkgs.gnumake
     27               pkgs.go
     28              ];
     29             preConfigure = ''
     30               ./bootstrap
     31             '';
     32           };
     33         }
     34       );
     35       defaultPackage = forEachSystem (system: self.packages.${system}.gnunet);
     36       # This defines a development shell in which you can compile
     37       # (and use) gnunet
     38        devShells = forEachSystem
     39         (system:
     40           let
     41             pkgs = nixpkgsFor.${system};
     42           in
     43           {
     44             default = pkgs.mkShell {
     45               packages = [
     46                 pkgs.gnumake
     47                 pkgs.go
     48               ];
     49 
     50               shellHook = ''
     51                 echo "TalDir environment loaded."
     52                '';
     53             };
     54           });
     55     };
     56 }