diff options
author | Vladimír Čunát <v@cunat.cz> | 2023-09-12 19:06:44 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2023-09-12 19:06:44 +0200 |
commit | 300eaad172fef6365ffd06d3816c2e6377c46311 (patch) | |
tree | b877cef4af6268503496fe59cc0f72a36da32b9f /pkgs/by-name/qu/quicktype/package.nix | |
parent | bc6f47f644cc42eed1fab8d0e16bb4ce32833f52 (diff) | |
parent | b874fb56d0f07a0ff88fcdc17e0001760ca89556 (diff) | |
download | nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.gz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.bz2 nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.lz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.xz nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.tar.zst nixlib-300eaad172fef6365ffd06d3816c2e6377c46311.zip |
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/by-name/qu/quicktype/package.nix')
-rw-r--r-- | pkgs/by-name/qu/quicktype/package.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/by-name/qu/quicktype/package.nix b/pkgs/by-name/qu/quicktype/package.nix new file mode 100644 index 000000000000..20ce7b39fb3a --- /dev/null +++ b/pkgs/by-name/qu/quicktype/package.nix @@ -0,0 +1,31 @@ +{ lib, buildNpmPackage, fetchFromGitHub, jq }: + +buildNpmPackage rec { + pname = "quicktype"; + version = "23.0.75"; # version from https://npm.im/quicktype + + src = fetchFromGitHub { + owner = "quicktype"; + repo = "quicktype"; + rev = "9b570a73a896306778940c793c0037a38815304a"; # version not tagged + hash = "sha256-boCBgIoM2GECipZTJlp9IaeXT24aR8tawS1X8CFDDqw="; + }; + + postPatch = '' + cat <<< $(${jq}/bin/jq '.version = "${version}"' package.json) > package.json + ''; + + npmDepsHash = "sha256-RA4HVQfB/ge1aIKl9HiUT7vUM5n+Ro6N2D6xj1dgSu8="; + + postInstall = '' + mv packages/ $out/lib/node_modules/quicktype/ + ''; + + meta = with lib; { + description = "Generate types and converters from JSON, Schema, and GraphQL"; + homepage = "https://quicktype.io/"; + license = licenses.asl20; + maintainers = [ maintainers.marsam ]; + mainProgram = "quicktype"; + }; +} |