add build for documentation pdf

This commit is contained in:
2025-11-10 10:30:00 +01:00
parent 30fed8c158
commit 0be681b0f0
3 changed files with 25 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
/*.pdf
/pack
/result

View File

@@ -88,6 +88,12 @@ You can build (and view) it by running:
make
```
Or when using Nix:
```sh
nix build
```
This will compile it once and open it using `xdg-open`.
### Building thesis examples

View File

@@ -8,10 +8,27 @@
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
dependencies = with pkgs; [ typst gnumake jq xdg-utils zip ];
in
{
packages.documentation = pkgs.stdenv.mkDerivation {
pname = "documentation";
version = "1.2";
src = ./.;
buildInputs = dependencies;
buildPhase = ''
make documentation.pdf
'';
installPhase = ''
mkdir -p $out
cp -r documentation.pdf $out/ || true
'';
};
packages.default = self.packages.${system}.documentation;
devShell = with pkgs; mkShell {
buildInputs = [ typst gnumake jq xdg-utils zip ];
buildInputs = dependencies;
};
}
);