taler-docs

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

flake.nix (2326B)


      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.python3.withPackages (python-pkgs: [
     30                 python-pkgs.setuptools
     31                 python-pkgs.jinja2
     32                 python-pkgs.sphinx
     33                 python-pkgs.sphinx-book-theme
     34                 python-pkgs.myst-parser
     35                 python-pkgs.sphinxcontrib-httpdomain
     36                 python-pkgs.sphinx-design
     37               ]))
     38              ];
     39             buildInputs = [
     40              ];
     41           };
     42         }
     43       );
     44       defaultPackage = forEachSystem (system: self.packages.${system}.talerDocs);
     45       # This defines a development shell in which you can compile
     46       # (and use) exchange
     47        devShells = forEachSystem
     48         (system:
     49           let
     50             pkgs = nixpkgsFor.${system};
     51           in
     52           {
     53             default = pkgs.mkShell {
     54               packages = [
     55                 pkgs.gnumake
     56                 (pkgs.python3.withPackages (python-pkgs: [
     57                   python-pkgs.setuptools
     58                   python-pkgs.jinja2
     59                   python-pkgs.sphinx
     60                   python-pkgs.sphinx-book-theme
     61                   python-pkgs.myst-parser
     62                   python-pkgs.sphinxcontrib-httpdomain
     63                 ]))
     64               ];
     65 
     66               shellHook = ''
     67                 echo "taler-docs environment loaded."
     68                '';
     69             };
     70           });
     71     };
     72 }