Merge pull request #304094 from szlend/redocly-v1.11-and-rename

This commit is contained in:
Sandro 2024-05-02 11:08:39 +02:00 committed by GitHub
commit 1be0aa4a39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 14 deletions

View file

@ -2,20 +2,22 @@
, buildNpmPackage , buildNpmPackage
, fetchFromGitHub , fetchFromGitHub
, makeWrapper , makeWrapper
, redocly
, testers
}: }:
buildNpmPackage rec { buildNpmPackage rec {
pname = "redocly-cli"; pname = "redocly";
version = "1.6.0"; version = "1.12.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Redocly"; owner = "Redocly";
repo = "redocly-cli"; repo = "redocly-cli";
rev = "@redocly/cli@${version}"; rev = "@redocly/cli@${version}";
hash = "sha256-xoehTTpXT/9tlL0VoDQwKbyUnNGeMyH+VBIVLiz69ko="; hash = "sha256-KfNwBRGDFNMsba+yjwUHiiO2BJbIl4pW1b3cvLBe+lk=";
}; };
npmDepsHash = "sha256-9fI9P96iNmHrhjbgjePpRnknFe3yIjkirOoIMkVGkH4="; npmDepsHash = "sha256-I3cxMw9zOZb9sfP8UUoHc1UJ0RpDqVn9D29arSdNob4=";
npmBuildScript = "prepare"; npmBuildScript = "prepare";
@ -32,24 +34,25 @@ buildNpmPackage rec {
mkdir $out/bin mkdir $out/bin
makeWrapper $out/lib/node_modules/@redocly/cli/node_modules/@redocly/cli/bin/cli.js \ makeWrapper $out/lib/node_modules/@redocly/cli/node_modules/@redocly/cli/bin/cli.js \
$out/bin/redocly-cli \ $out/bin/redocly \
--set-default REDOCLY_TELEMETRY off \ --set-default REDOCLY_TELEMETRY off \
--set-default CI true # Silence update messages --set-default CI true # Silence update messages
# Symlink for backwards compatibility. Remove after 24.05.
ln -s $out/bin/redocly $out/bin/redocly-cli
''; '';
installCheckPhase = '' passthru = {
runHook preInstallCheck tests.version = testers.testVersion {
$out/bin/redocly-cli --version package = redocly;
runHook postInstallCheck };
''; };
doInstallCheck = true;
meta = { meta = {
description = "Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more."; description = "Makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more";
homepage = "https://github.com/Redocly/redocly-cli"; homepage = "https://github.com/Redocly/redocly-cli";
license = lib.licenses.mit; license = lib.licenses.mit;
mainProgram = "redocly-cli"; mainProgram = "redocly";
maintainers = with lib.maintainers; [ szlend ]; maintainers = with lib.maintainers; [ szlend ];
}; };
} }

View file

@ -1073,6 +1073,7 @@ mapAliases ({
rccl = throw "'rccl' has been replaced with 'rocmPackages.rccl'"; # Added 2023-10-08 rccl = throw "'rccl' has been replaced with 'rocmPackages.rccl'"; # Added 2023-10-08
rdc = throw "'rdc' has been replaced with 'rocmPackages.rdc'"; # Added 2023-10-08 rdc = throw "'rdc' has been replaced with 'rocmPackages.rdc'"; # Added 2023-10-08
readline63 = throw "'readline63' has been replaced with 'readline'"; # Added 2024-02-10 readline63 = throw "'readline63' has been replaced with 'readline'"; # Added 2024-02-10
redocly-cli = redocly; # Added 2024-04-14
redpanda = redpanda-client; # Added 2023-10-14 redpanda = redpanda-client; # Added 2023-10-14
restya-board = throw "'restya-board' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-01-22 restya-board = throw "'restya-board' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2024-01-22
retdec-full = throw "'retdec-full' is no longer needed, please use 'retdec'"; # Added 2024-02-05 retdec-full = throw "'retdec-full' is no longer needed, please use 'retdec'"; # Added 2024-02-05