Rewrite comments and option descriptions under nix/ that narrate how the
code got here ("used to", "new name", "sat at the TOP", "no longer",
renamed/moved narration, attributions) to say what the code does now and
why. Comments and description strings only; no logic changes.
Files in open PR #4970's diff are left alone. Refs #3902
47 lines
1.8 KiB
Nix
47 lines
1.8 KiB
Nix
{
|
|
stdenv,
|
|
fetchurl,
|
|
}:
|
|
|
|
# Pure vendored Swagger UI 5.17.14 static dist — no hyperhive theming
|
|
# (see ./swagger-ui-theme.nix for that layer). Deliberately NOT sourced
|
|
# via the Rust `utoipa-swagger-ui-vendored` crate / Cargo.lock: this is a
|
|
# nix package that just contains the plain static dist, not fetched via
|
|
# cargo — hive-c0re does not need to know this exists, because the
|
|
# gateway hosts it directly.
|
|
#
|
|
# Sourced straight from the `swagger-ui-dist` npm package, which ships
|
|
# exactly the built `dist/` files (no source, no build step needed) at
|
|
# the same release as the Rust ecosystem's vendored copy — verified by
|
|
# comparing this tarball's recorded `gitHead` (in its `package.json`,
|
|
# `74ed0adebfc9c8dd0de2bf8e81495b022a66c083`) against the commit the
|
|
# `utoipa-swagger-ui-vendored` crate's own pinned zip was built from
|
|
# (same hash, printed by `unzip -l` on that zip's first entry).
|
|
stdenv.mkDerivation {
|
|
pname = "swagger-ui-dist";
|
|
version = "5.17.14";
|
|
|
|
src = fetchurl {
|
|
url = "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz";
|
|
hash = "sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw==";
|
|
};
|
|
|
|
sourceRoot = "package";
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out
|
|
# The npm package also carries a few node-consumption conveniences
|
|
# (package.json, index.js, absolute-path.js, README/LICENSE/NOTICE)
|
|
# alongside the actual browser dist — only copy what a web server
|
|
# should ever expose.
|
|
cp *.html *.css *.css.map *.js *.js.map *.png $out/
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Vendored Swagger UI 5.17.14 static dist (unthemed), from the swagger-ui-dist npm package";
|
|
homepage = "https://forge.darkest.space/hyperhive/hyperhive";
|
|
};
|
|
}
|