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