8 hash = "sha256-q2FwkwzjanxTIxjMpCyMpzPt782uYZiWVdZ7Eev79oM=";
10 repo = "antora-ui-default";
11 rev = "83bf9bf5f22a6dee397f8b089eb0315c14a278b5";
14 stdenvNoCC.mkDerivation {
15 pname = "antora-ui-default";
18 # The UI bundle is fetched from lib.maintainers.naho's antora-ui-default fork
19 # for the following reasons:
21 # > The UI bundle is currently unpackaged [1] [2], and only accessible by
22 # > fetching the latest GitLab artifact or building from source. Neither
23 # > method is reliably reproducible, as artifacts are deleted over time and
24 # > building from source requires insecure Node 10.
26 # > The solution is to version control the UI bundle.
30 # > [1]: https://gitlab.com/antora/antora-ui-default/-/issues/135
31 # > [2]: https://gitlab.com/antora/antora-ui-default/-/issues/211
35 # To avoid bloating the repository archive size, the UI bundle is not stored
38 # For reference, the UI bundle from [3] is 300K large.
40 # [3]: https://gitlab.com/trueNAHO/antora-ui-default/-/commit/83bf9bf5f22a6dee397f8b089eb0315c14a278b5
41 src = fetchFromGitLab srcFetchFromGitLab;
43 phases = [ "installPhase" ];
45 # Install '$src/ui-bundle.zip' to '$out/ui-bundle.zip' instead of '$out' to
46 # prevent the ZIP from being misidentified as a binary [1].
48 # [1]: https://github.com/NixOS/nixpkgs/blob/8885a1e21ad43f8031c738a08029cd1d4dcbc2f7/pkgs/stdenv/generic/setup.sh#L792-L795
50 mkdir --parents "$out"
51 cp "$src/ui-bundle.zip" "$out"
55 description = "Antora default UI bundle";
56 homepage = "https://gitlab.com/antora/antora-ui-default";
57 license = lib.licenses.mpl20;
60 > A UI bundle is a [ZIP
61 > archive](https://en.wikipedia.org/wiki/Zip_(file_format)) or directory
62 > that contains one or more UIs for a site.
65 > https://docs.antora.org/antora/3.1/playbook/ui-bundle-url
67 This UI bundle is available under `$out/ui-bundle.zip` and intended to be
68 passed to `antora`'s `--ui-bundle-url` flag or injected into the
70 key](https://docs.antora.org/antora/3.1/playbook/ui-bundle-url/#url-key)
71 to avoid irreproducible
72 [`https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable`](https://gitlab.com/${srcFetchFromGitLab.owner}/${srcFetchFromGitLab.repo}/-/blob/${srcFetchFromGitLab.rev}/README.adoc#user-content-use-the-default-ui)
76 maintainers = [ lib.maintainers.naho ];
77 platforms = lib.platforms.all;