taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

flake.nix (2692B)


      1 {
      2   inputs = {
      3     nixpkgs.url = "nixpkgs/release-25.11";
      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 this package from git as a dependency
     18       packages = forEachSystem (system:
     19         let
     20           pkgs = nixpkgsFor.${system};
     21         in {
     22           talerDocs = pkgs.stdenv.mkDerivation {
     23             name = "taler-docs";
     24             src = ./.;
     25             nativeBuildInputs = [
     26               pkgs.gnumake
     27               pkgs.texlive.combined.scheme-full
     28               pkgs.gnumake
     29               pkgs.plantuml
     30               pkgs.graphviz
     31               (pkgs.python3.withPackages (python-pkgs: [
     32                 python-pkgs.setuptools
     33                 python-pkgs.jinja2
     34                 python-pkgs.sphinx
     35                 python-pkgs.sphinx-book-theme
     36                 python-pkgs.myst-parser
     37                 python-pkgs.sphinxcontrib-httpdomain
     38                 python-pkgs.sphinxcontrib-plantuml
     39                 python-pkgs.sphinxcontrib-mermaid
     40                 python-pkgs.sphinx-design
     41               ]))
     42              ];
     43             buildInputs = [
     44              ];
     45           };
     46         }
     47       );
     48       defaultPackage = forEachSystem (system: self.packages.${system}.talerDocs);
     49       # This defines a development shell in which you can compile
     50       # (and use) exchange
     51        devShells = forEachSystem
     52         (system:
     53           let
     54             pkgs = nixpkgsFor.${system};
     55           in
     56           {
     57             default = pkgs.mkShell {
     58               packages = [
     59                 pkgs.gnumake
     60                 pkgs.plantuml
     61                 pkgs.graphviz
     62                 (pkgs.python3.withPackages (python-pkgs: [
     63                   python-pkgs.setuptools
     64                   python-pkgs.jinja2
     65                   python-pkgs.sphinx
     66                   python-pkgs.sphinx-book-theme
     67                   python-pkgs.myst-parser
     68                   python-pkgs.sphinxcontrib-httpdomain
     69                   python-pkgs.sphinxcontrib-plantuml
     70                   python-pkgs.sphinxcontrib-mermaid
     71                   python-pkgs.sphinx-design
     72                 ]))
     73               ];
     74 
     75               shellHook = ''
     76                 echo "taler-docs environment loaded."
     77                '';
     78             };
     79           });
     80     };
     81 }