docs: add package for building zim archive

This commit is contained in:
Snoweuph 2026-05-20 17:41:17 +02:00
commit 0d2c8c8307
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
4 changed files with 30 additions and 0 deletions

View file

@ -51,6 +51,8 @@ in
mkdir -p $out/share/doc mkdir -p $out/share/doc
cp -r build/* $out/share/doc/ cp -r build/* $out/share/doc/
cp ./logo.png $out/share/doc/assets/logo.png
# Hydra support. Probably not necessary. # Hydra support. Probably not necessary.
mkdir -p $out/nix-support/ mkdir -p $out/nix-support/
echo "doc manual $out/share/doc index.html" >> $out/nix-support/hydra-build-products echo "doc manual $out/share/doc index.html" >> $out/nix-support/hydra-build-products

BIN
docs/manual/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

View file

@ -462,6 +462,9 @@
- Added coverage support (`vim.utility.crazy-coverage`) via - Added coverage support (`vim.utility.crazy-coverage`) via
[`crazy-coverage.nvim`](https://github.com/mr-u0b0dy/crazy-coverage.nvim). [`crazy-coverage.nvim`](https://github.com/mr-u0b0dy/crazy-coverage.nvim).
- Added new package `docs-zim`, which produces a `.zim` which can be used with
`services.kiwix-serve`.
[vagahbond](https://github.com/vagahbond): [codewindow.nvim]: [vagahbond](https://github.com/vagahbond): [codewindow.nvim]:
https://github.com/gorbit99/codewindow.nvim https://github.com/gorbit99/codewindow.nvim

View file

@ -118,6 +118,31 @@
fi fi
''; '';
docs-zim = pkgs.stdenv.mkDerivation {
name = "nvf-docs-zim";
dontUnpack = true;
buildInputs = [pkgs.zim-tools];
installPhase = ''
mkdir -p $out
zimwriterfs \
--welcome 'index.html' \
--illustration 'assets/logo.png' \
--language 'eng' \
--name 'mvf-manual' \
--title 'NVF Manual' \
--description 'nvf is a modular and extensible Neovim configuration framework built for Nix' \
--longDescription 'nvf is a highly modular, configurable, extensible and easy to use Neovim configuration framework built for and designed to be used with Nix. Boasting flexibility, robustness and ease of use (among other positive traits), this project allows you to configure a fully featured Neovim instance with a few lines of Nix while leaving all kinds of doors open for integrating Lua in your configurations whether you are a beginner or an advanced user.' \
-c 'NotAShelf and NVF Contributors' \
-p 'NotAShelf and NVF Contributors' \
--tags 'devdocs;nix' \
--source 'https://nvf.notashelf.dev/' \
--scraper 'ndg' \
${docs.manual.html}/share/doc $out/nvf.zim
'';
};
# Exposed neovim configurations # Exposed neovim configurations
nix = buildPkg false; nix = buildPkg false;
maximal = buildPkg true; maximal = buildPkg true;