Commit Graph

4 Commits

Author SHA1 Message Date
Pol Dellaiera
d15c0558d6
fix: remove custom pygments-style-github (#307)
It has been added to Nix at: https://github.com/NixOS/nixpkgs/pull/214015
2023-02-03 12:09:56 +01:00
Pol Dellaiera
de799935b2
refactor: CI and nix (#306)
* fix: remove custom fonts

Since they are available in Nix, there is no need to keep them in the project anymore

* chore: remove old obsolete files

* refactor: rewrite Nix files

- Switch from `numtide/flake-utils` to `flake-parts`
- Add custom font derivation for LaTeX
- Add `formatter`
- Switch to `python311`

* ci: update Github workflows

* feat: add `Makefile` for local development

Very useful when used in combination with `nix develop`

* feat: add `.envrc` file for loading development environment with `nix-direnv`

* feat: add `.editorconfig` and `.prettierrc`

* style: reformat files using `prettier`

Run `nix run nixpkgs#nodePackages.prettier -- --write .`

* fix: add workaround to prevent bug with `minted` package

see https://github.com/gpoore/minted/issues/353 for context

* fix: add `version.tex` in the repo

* chore: rewrite `README`

* chore: ignore LaTeX temporary files while building locally

* feat: add `latexindent.pl` configuration file

* style: lint LaTeX files
2023-02-02 10:53:45 +01:00
Pol Dellaiera
bfe7a1fa48
Use Nix for building PDFs. (#286) 2022-02-25 17:12:14 +02:00
aszlig
bca9cf5d3d
Switch to using Nix flakes (#253)
Someone has requested me to build this book, since they didn't have Nix.

So when looking at the Nix expressions I found that there was only a
shell.nix and the default.nix was essentially just aliasing the
shell.nix but without the pinning.

However, with Nix flakes we no longer need to do pinning like this and
we instead have a flake.lock file, which essentially pins the
corresponding revisions.

I also added a default.nix, which uses flake-compat to make sure that
nix-shell and nix-build work as before.

Since so far the way to build the PDF(s) was to get into a Nix shell and
run make accordingly. For me however it's unacceptable to build random
code without the Nix sandbox, so while writing a proper default.nix I
decided it would be better to turn it into a Nix flake.

Apart from the previous ways to build this project we now have:

  $ nix develop # To get a Nix shell (similar to nix-shell but cached)
  $ nix build # The default edition
  $ nix build .\#ctfp-scala # The Scala edition
  $ nix build .\#ctfp-ocaml # The OCaml edition

Signed-off-by: aszlig <aszlig@nix.build>
2020-09-04 15:16:42 +03:00