diff options
Nixify build process
Building the website in the presence of the Nix package manager is now
as simple as:
- cloning this repo
- entering the nix-shell environment declared by `shell.nix`
- calling `generate`
- optionally call `preview` to spawn a webserver in `target/99_result`
All dependencies such as the internal InputXSLT, StaticXSLT and
BuildXSLT modules as well as external ones such as KaTeX and pandoc are
built declaratively by Nix.
Diffstat (limited to 'pkgs/preview.nix')
-rw-r--r-- | pkgs/preview.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/preview.nix b/pkgs/preview.nix new file mode 100644 index 0000000..7162838 --- /dev/null +++ b/pkgs/preview.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +pkgs.writeScriptBin + "preview" + '' + pushd target/99_result + ${pkgs.python3}/bin/python -m http.server 8080 + popd + '' |