mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 14:14:20 +00:00
json2ts: fix build on darwin; allow case insensitive import (#358398)
This commit is contained in:
commit
296063131c
@ -2,6 +2,7 @@
|
|||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
lib,
|
lib,
|
||||||
|
jq,
|
||||||
}:
|
}:
|
||||||
buildNpmPackage {
|
buildNpmPackage {
|
||||||
name = "json2ts";
|
name = "json2ts";
|
||||||
@ -12,8 +13,17 @@ buildNpmPackage {
|
|||||||
rev = "118d6a8e7a5a9397d1d390ce297f127ae674a623";
|
rev = "118d6a8e7a5a9397d1d390ce297f127ae674a623";
|
||||||
hash = "sha256-ldAFfw3E0A0lIJyDSsshgPRPR7OmV/FncPsDhC3waT8=";
|
hash = "sha256-ldAFfw3E0A0lIJyDSsshgPRPR7OmV/FncPsDhC3waT8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ jq ];
|
||||||
npmDepsHash = "sha256-kLKau4SBxI9bMAd7X8/FQfCza2sYl/+0bg2LQcOQIJo=";
|
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; {
|
meta = with lib; {
|
||||||
mainProgram = "json2ts";
|
mainProgram = "json2ts";
|
||||||
description = "Compile JSON Schema to TypeScript type declarations";
|
description = "Compile JSON Schema to TypeScript type declarations";
|
||||||
|
Loading…
Reference in New Issue
Block a user