add build for documentation pdf
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/*.pdf
|
||||
/pack
|
||||
/result
|
||||
|
||||
@@ -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
|
||||
|
||||
19
flake.nix
19
flake.nix
@@ -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;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user