Files
nixpkgs/pkgs/by-name/js/json2ts/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

37 lines
1.1 KiB
Nix

{
buildNpmPackage,
fetchFromGitHub,
lib,
jq,
}:
buildNpmPackage {
name = "json2ts";
version = "15.0.2";
src = fetchFromGitHub {
owner = "bcherny";
repo = "json-schema-to-typescript";
rev = "118d6a8e7a5a9397d1d390ce297f127ae674a623";
hash = "sha256-ldAFfw3E0A0lIJyDSsshgPRPR7OmV/FncPsDhC3waT8=";
};
nativeBuildInputs = [ jq ];
npmDepsHash = "sha256-kLKau4SBxI9bMAd7X8/FQfCza2sYl/+0bg2LQcOQIJo=";
# forceConsistentCasingInFileNames: false is needed for typescript on darwin
# https://www.typescriptlang.org/tsconfig/#forceConsistentCasingInFileNames
postConfigure = ''
jq '.compilerOptions.forceConsistentCasingInFileNames = false' tsconfig.json > temp.json
mv temp.json tsconfig.json
'';
meta = with lib; {
mainProgram = "json2ts";
description = "Compile JSON Schema to TypeScript type declarations";
homepage = "https://github.com/bcherny/json-schema-to-typescript";
changelog = "https://github.com/bcherny/json-schema-to-typescript/blob/master/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ hsjobeki ];
platforms = platforms.all;
};
}