update readme
This commit is contained in:
parent
9ab363b0f7
commit
9939d5ca27
1 changed files with 22 additions and 5 deletions
27
README.md
27
README.md
|
@ -23,15 +23,32 @@ interface to the familiar `nixpkgs` package repository. Instead of building
|
|||
programs, however, it builds documents. Review [the flake](./2024/flake.nix)
|
||||
for more information.
|
||||
|
||||
You can test this local compilation yourself very easily! Simply run:
|
||||
Since the flake in [2024] provides a package set, you can use the `nix search`
|
||||
command on it to discover documents just like `nixpkgs`. Try:
|
||||
|
||||
```sh
|
||||
nix search git+https://code.youwen.dev/youwen5/alexandria?dir=2024 phil-1
|
||||
```
|
||||
|
||||
You can compile any document in this repository yourself very easily! Simply
|
||||
run:
|
||||
|
||||
```sh
|
||||
nix build 'git+https://code.youwen.dev/youwen5/alexandria?dir=2024#digression-linear-algebra'
|
||||
```
|
||||
|
||||
This will create a `result` that points to the compiled PDF in the Nix store.
|
||||
Currently, the file is not marked as a PDF with a `.pdf` file extension, but
|
||||
one should be able to easily `cp` the file from the Nix store into another
|
||||
The builds are managed by the amazing
|
||||
[typix](https://github.com/loqusion/typix) project. It helps provide a
|
||||
hermetically sealed build environment, which means that all _dependencies_ of
|
||||
the documents are specified, including fonts, commonly forgotten due to being
|
||||
installed systemwide. Also, the build process clones down a copy of the entire
|
||||
[Typst package repository](https://github.com/typst/packages), version locked
|
||||
in [flake.lock](./2024/flake.lock). This means that packages are also
|
||||
guaranteed to be reproducible and available.
|
||||
|
||||
Compilation creates a `result` that points to the compiled PDF in the Nix
|
||||
store. Currently, the file is not marked as a PDF with a `.pdf` file extension,
|
||||
but one should be able to easily `cp` the file from the Nix store into another
|
||||
directory with a proper file name. Work is ongoing to make this as smooth as
|
||||
possible.
|
||||
|
||||
|
@ -45,7 +62,7 @@ I am not currently using LaTeX.
|
|||
All of the work is sectioned into a `2024` directory for two reasons.
|
||||
|
||||
Firstly, since all of the documents in the repository depend on the `nixpkgs`
|
||||
and `Typix` specified in the central `flake.nix`, breaking changes may require
|
||||
and `typst` specified in the central `flake.nix`, breaking changes may require
|
||||
refactoring and maintenance of old documents. This is how `nixpkgs` works, but
|
||||
these repositories host _documents_, not software. Thus, I have opted to
|
||||
organize the tree in such way that each year should be its own standalone
|
||||
|
|
Loading…
Reference in a new issue