From a4701fcf3e9c01ae7ba4d298f0abd45a694343c7 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 9 Sep 2023 04:20:00 +0000 Subject: quicktype: use buildNpmPackage --- pkgs/by-name/qu/quicktype/package.nix | 31 ++++ pkgs/development/node-packages/aliases.nix | 1 + pkgs/development/node-packages/node-packages.json | 1 - pkgs/development/node-packages/node-packages.nix | 168 ---------------------- 4 files changed, 32 insertions(+), 169 deletions(-) create mode 100644 pkgs/by-name/qu/quicktype/package.nix (limited to 'pkgs') diff --git a/pkgs/by-name/qu/quicktype/package.nix b/pkgs/by-name/qu/quicktype/package.nix new file mode 100644 index 0000000000000..20ce7b39fb3ad --- /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"; + }; +} diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index dad33e39b5531..bcc592cd88ad1 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -97,6 +97,7 @@ mapAliases { inherit (pkgs) npm-check-updates; # added 2023-08-22 ocaml-language-server = throw "ocaml-language-server was removed because it was abandoned upstream"; # added 2023-09-04 parcel-bundler = parcel; # added 2023-09-04 + inherit (pkgs) quicktype; # added 2023-09-09 inherit (pkgs) react-static; # added 2023-08-21 readability-cli = pkgs.readability-cli; # Added 2023-06-12 reveal-md = pkgs.reveal-md; # added 2023-07-31 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index b6c111bdccd4e..352545b02fb22 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -217,7 +217,6 @@ , "purty" , "pxder" , "pyright" -, "quicktype" , "react-native-cli" , "react-tools" , "redoc-cli" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 724549d61fbc8..ed41b9eb4b4f6 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -104017,174 +104017,6 @@ in bypassCache = true; reconstructLock = true; }; - quicktype = nodeEnv.buildNodePackage { - name = "quicktype"; - packageName = "quicktype"; - version = "23.0.71"; - src = fetchurl { - url = "https://registry.npmjs.org/quicktype/-/quicktype-23.0.71.tgz"; - sha512 = "MPPTnromb8qSKPU5UdLyp9Kzkj8YhmmOfw5y1ZvBLnzNjVG2QVqlwyLkUL9NTfmKszb0/047p3hiznEnFGn4EA=="; - }; - dependencies = [ - (sources."@75lb/deep-merge-1.1.1" // { - dependencies = [ - sources."typical-7.1.1" - ]; - }) - sources."@cspotcode/source-map-support-0.8.1" - sources."@glideapps/ts-necessities-2.1.3" - sources."@jridgewell/resolve-uri-3.1.1" - sources."@jridgewell/sourcemap-codec-1.4.15" - sources."@jridgewell/trace-mapping-0.3.9" - (sources."@mark.probst/typescript-json-schema-0.55.0" // { - dependencies = [ - sources."typescript-4.9.4" - ]; - }) - sources."@swc/core-1.3.78" - sources."@swc/core-darwin-arm64-1.3.78" - sources."@swc/core-darwin-x64-1.3.78" - sources."@swc/core-linux-arm-gnueabihf-1.3.78" - sources."@swc/core-linux-arm64-gnu-1.3.78" - sources."@swc/core-linux-arm64-musl-1.3.78" - sources."@swc/core-linux-x64-gnu-1.3.78" - sources."@swc/core-linux-x64-musl-1.3.78" - sources."@swc/core-win32-arm64-msvc-1.3.78" - sources."@swc/core-win32-ia32-msvc-1.3.78" - sources."@swc/core-win32-x64-msvc-1.3.78" - sources."@swc/helpers-0.5.1" - sources."@swc/wasm-1.3.78" - sources."@tsconfig/node10-1.0.9" - sources."@tsconfig/node12-1.0.11" - sources."@tsconfig/node14-1.0.3" - sources."@tsconfig/node16-1.0.4" - sources."@types/json-schema-7.0.12" - sources."@types/node-16.18.43" - sources."@types/urijs-1.19.19" - sources."abort-controller-3.0.0" - sources."acorn-8.10.0" - sources."acorn-walk-8.2.0" - sources."ansi-regex-5.0.1" - sources."ansi-styles-4.3.0" - sources."arg-4.1.3" - sources."array-back-3.1.0" - sources."balanced-match-1.0.2" - sources."base64-js-1.5.1" - sources."brace-expansion-1.1.11" - sources."browser-or-node-2.1.1" - sources."buffer-6.0.3" - sources."chalk-4.1.2" - sources."chalk-template-0.4.0" - sources."cliui-8.0.1" - sources."collection-utils-1.0.1" - sources."color-convert-2.0.1" - sources."color-name-1.1.4" - sources."command-line-args-5.2.1" - (sources."command-line-usage-7.0.1" // { - dependencies = [ - sources."array-back-6.2.2" - sources."typical-7.1.1" - ]; - }) - sources."concat-map-0.0.1" - sources."create-require-1.1.1" - sources."cross-fetch-4.0.0" - sources."diff-4.0.2" - sources."emoji-regex-8.0.0" - sources."encoding-0.1.13" - sources."escalade-3.1.1" - sources."event-target-shim-5.0.1" - sources."events-3.3.0" - sources."find-replace-3.0.0" - sources."fs.realpath-1.0.0" - sources."get-caller-file-2.0.5" - sources."glob-7.2.3" - sources."graphql-0.11.7" - sources."has-flag-4.0.0" - sources."iconv-lite-0.6.3" - sources."ieee754-1.2.1" - sources."inflight-1.0.6" - sources."inherits-2.0.4" - sources."is-fullwidth-code-point-3.0.0" - sources."is-url-1.2.4" - sources."iterall-1.1.3" - sources."js-base64-3.7.5" - sources."lodash-4.17.21" - sources."lodash.assignwith-4.2.0" - sources."lodash.camelcase-4.3.0" - sources."make-error-1.3.6" - sources."minimatch-3.1.2" - sources."moment-2.29.4" - sources."node-fetch-2.6.13" - sources."once-1.4.0" - sources."pako-1.0.11" - sources."path-equal-1.2.5" - sources."path-is-absolute-1.0.1" - sources."pluralize-8.0.0" - sources."process-0.11.10" - sources."quicktype-core-23.0.71" - sources."quicktype-graphql-input-23.0.71" - sources."quicktype-typescript-input-23.0.71" - sources."readable-stream-4.4.2" - sources."require-directory-2.1.1" - sources."safe-buffer-5.2.1" - sources."safe-stable-stringify-2.4.3" - sources."safer-buffer-2.1.2" - sources."stream-chain-2.2.5" - sources."stream-json-1.8.0" - sources."stream-read-all-3.0.1" - (sources."string-to-stream-3.0.1" // { - dependencies = [ - sources."readable-stream-3.6.2" - ]; - }) - sources."string-width-4.2.3" - sources."string_decoder-1.3.0" - sources."strip-ansi-6.0.1" - sources."supports-color-7.2.0" - (sources."table-layout-3.0.2" // { - dependencies = [ - sources."array-back-6.2.2" - sources."typical-7.1.1" - ]; - }) - sources."tiny-inflate-1.0.3" - sources."tr46-0.0.3" - sources."ts-node-10.9.1" - sources."tslib-2.6.2" - sources."typescript-4.9.5" - sources."typical-4.0.0" - sources."unicode-properties-1.4.1" - (sources."unicode-trie-2.0.0" // { - dependencies = [ - sources."pako-0.2.9" - ]; - }) - sources."urijs-1.19.11" - sources."util-deprecate-1.0.2" - sources."v8-compile-cache-lib-3.0.1" - sources."webidl-conversions-3.0.1" - sources."whatwg-url-5.0.0" - sources."wordwrap-1.0.0" - sources."wordwrapjs-5.1.0" - sources."wrap-ansi-7.0.0" - sources."wrappy-1.0.2" - sources."y18n-5.0.8" - sources."yaml-2.3.1" - sources."yargs-17.7.2" - sources."yargs-parser-21.1.1" - sources."yn-3.1.1" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "![](https://raw.githubusercontent.com/quicktype/quicktype/master/media/quicktype-logo.svg?sanitize=true)"; - homepage = "https://github.com/quicktype/quicktype#readme"; - license = "Apache-2.0"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; react-native-cli = nodeEnv.buildNodePackage { name = "react-native-cli"; packageName = "react-native-cli"; -- cgit 1.4.1