{ 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 (per the # operator's ask: a nix package that just contains the plain static # dist, not fetched via cargo) — hive-c0re no longer needs to know this # exists at all once 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"; }; }