nixpkgs/pkgs/by-name/re/redoc-cli/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

37 lines
866 B
Nix

{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {
pname = "redoc-cli";
version = "0.13.21";
src = fetchFromGitHub {
owner = "Redocly";
repo = "redoc";
rev = "d3ac16f4774ae5b5f698b4e8f4c1d3f5a009d361";
hash = "sha256-LmNb+m1Ng/53SPUqrr/AmxNMiWsrMGCKow0DW/9t3Do=";
};
sourceRoot = "${src.name}/cli";
npmDepsHash = "sha256-XL4D7+hb0zOxAr/aRo2UOg4UOip3oewbffsnkFddmWw=";
postPatch = ''
ln -s npm-shrinkwrap.json package-lock.json
'';
dontNpmBuild = true;
meta = {
description = "OpenAPI/Swagger-generated API Reference Documentation";
homepage = "https://github.com/Redocly/redoc/tree/redoc-cli/cli";
license = lib.licenses.mit;
mainProgram = "redoc-cli";
maintainers = with lib.maintainers; [ veehaitch ];
# https://github.com/NixOS/nixpkgs/issues/272217
broken = true;
};
}