nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildNpmPackage,
5 nodejs,
6 versionCheckHook,
7 nix-update-script,
8}:
9
10buildNpmPackage (finalAttrs: {
11 pname = "openapi-down-convert";
12 version = "0.14.2";
13
14 src = fetchFromGitHub {
15 owner = "apiture";
16 repo = "openapi-down-convert";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-auHZ6xfsOhGetzH4sSsZy+EC9eM06GKMww0h9iN8Heo=";
19 };
20
21 npmDepsHash = "sha256-gVRHp28NhremVit34nngq0KvDn16m0xJIyUooiD7MtU=";
22
23 postInstall = ''
24 find $out/lib -type f \( -name '*.ts' \) -delete
25 rm -r $out/lib/node_modules/@apiture/openapi-down-convert/node_modules/typescript
26 rm $out/lib/node_modules/@apiture/openapi-down-convert/node_modules/.bin/*
27 '';
28
29 nativeInstallCheckInputs = [
30 versionCheckHook
31 ];
32 doInstallCheck = true;
33
34 passthru.updateScript = nix-update-script { };
35
36 meta = {
37 description = "Convert an OpenAPI 3.1.x document to OpenAPI 3.0.x format";
38 homepage = "https://github.com/apiture/openapi-down-convert";
39 changelog = "https://github.com/apiture/openapi-down-convert/releases/tag/v${finalAttrs.version}";
40 license = lib.licenses.isc;
41 maintainers = with lib.maintainers; [ fliegendewurst ];
42 mainProgram = "openapi-down-convert";
43 };
44})