9 pname = "antora-lunr-extension";
10 version = "1.0.0-alpha.8";
12 src = fetchFromGitLab {
13 hash = "sha256-GplCwhUl8jurD4FfO6/T3Vo1WFjg+rtAjWeIh35unk4=";
19 npmDepsHash = "sha256-EtjZL6U/uSGSYSqtuatCkdWP0NHxRuht13D9OaM4x00=";
21 # Prevent tests from failing because they are fetching data at runtime.
23 substituteInPlace package.json --replace '"_mocha"' '""'
26 # Pointing $out to $out/lib/node_modules/@antora/lunr-extension simplifies
27 # Antora's extension option usage from
29 # --extension ${pkgs.antora-lunr-extension}/lib/node_modules/@antora/lunr-extension
33 # --extension ${pkgs.antora-lunr-extension}
35 directory="$(mktemp --directory)"
37 mv "$out/"{.,}* "$directory"
38 mv "$directory/lib/node_modules/@antora/lunr-extension/"{.,}* "$out"
42 tests.run = antora.tests.run.override {
43 antora-lunr-extension-test = true;
46 updateScript = nix-update-script { };
50 description = "Antora extension adding offline, full-text search powered by Lunr";
51 homepage = "https://gitlab.com/antora/antora-lunr-extension";
52 license = lib.licenses.mpl20;
55 This Antora extension is intended to be passed to `antora`'s `--extension`
56 flag or injected into the [`antora.extensions`
57 key](https://docs.antora.org/antora/3.1/extend/enable-extension).
60 maintainers = [ lib.maintainers.naho ];
61 platforms = lib.platforms.all;