From 89250966ad7a1d61587ab2216b39b30ee8259742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elizabeth=20Pa=C5=BA?= Date: Fri, 26 May 2023 14:54:44 +0700 Subject: [PATCH] eslint_d: repackage using buildNpmPackage Apply suggestions from code review Co-authored-by: Sandro --- pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 122 ------------------ pkgs/development/tools/eslint_d/default.nix | 24 ++++ pkgs/top-level/all-packages.nix | 2 + 5 files changed, 27 insertions(+), 123 deletions(-) create mode 100644 pkgs/development/tools/eslint_d/default.nix diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 04c8da00646d..bd961ba3051b 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -42,6 +42,7 @@ mapAliases { "@githubnext/github-copilot-cli" = pkgs.github-copilot-cli; # Added 2023-05-02 "@google/clasp" = pkgs.google-clasp; # Added 2023-05-07 "@nestjs/cli" = pkgs.nest-cli; # Added 2023-05-06 + eslint_d = pkgs.eslint_d; # Added 2023-05-26 manta = pkgs.node-manta; # Added 2023-05-06 triton = pkgs.triton; # Added 2023-05-06 } diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 75b7e49bcdc2..85e9d995f4ba 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -130,7 +130,6 @@ , "emojione" , "escape-string-regexp" , "eslint" -, "eslint_d" , "esy" , "expo-cli" , "fast-cli" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 152ef95b4726..ad202144ef62 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -104382,128 +104382,6 @@ in bypassCache = true; reconstructLock = true; }; - eslint_d = nodeEnv.buildNodePackage { - name = "eslint_d"; - packageName = "eslint_d"; - version = "12.2.1"; - src = fetchurl { - url = "https://registry.npmjs.org/eslint_d/-/eslint_d-12.2.1.tgz"; - sha512 = "qOJ9cTi5AaH5bOgEoCkv41DJ637mHgzffbOLojwU4wadwC6qbR+OxVJRvVzH0v2XYmQOvw4eiJK7ivrr5SvzsA=="; - }; - dependencies = [ - sources."@eslint-community/eslint-utils-4.4.0" - sources."@eslint-community/regexpp-4.5.1" - sources."@eslint/eslintrc-2.0.3" - sources."@eslint/js-8.41.0" - sources."@humanwhocodes/config-array-0.11.8" - sources."@humanwhocodes/module-importer-1.0.1" - sources."@humanwhocodes/object-schema-1.2.1" - sources."@nodelib/fs.scandir-2.1.5" - sources."@nodelib/fs.stat-2.0.5" - sources."@nodelib/fs.walk-1.2.8" - sources."acorn-8.8.2" - sources."acorn-jsx-5.3.2" - sources."ajv-6.12.6" - sources."ansi-regex-5.0.1" - sources."ansi-styles-4.3.0" - sources."argparse-2.0.1" - sources."balanced-match-1.0.2" - sources."brace-expansion-1.1.11" - sources."callsites-3.1.0" - (sources."chalk-4.1.2" // { - dependencies = [ - sources."supports-color-7.2.0" - ]; - }) - sources."color-convert-2.0.1" - sources."color-name-1.1.4" - sources."concat-map-0.0.1" - sources."core_d-5.0.1" - sources."cross-spawn-7.0.3" - sources."debug-4.3.4" - sources."deep-is-0.1.4" - sources."doctrine-3.0.0" - sources."escape-string-regexp-4.0.0" - sources."eslint-8.41.0" - sources."eslint-scope-7.2.0" - sources."eslint-visitor-keys-3.4.1" - sources."espree-9.5.2" - sources."esquery-1.5.0" - sources."esrecurse-4.3.0" - sources."estraverse-5.3.0" - sources."esutils-2.0.3" - sources."fast-deep-equal-3.1.3" - sources."fast-json-stable-stringify-2.1.0" - sources."fast-levenshtein-2.0.6" - sources."fastq-1.15.0" - sources."file-entry-cache-6.0.1" - sources."find-up-5.0.0" - sources."flat-cache-3.0.4" - sources."flatted-3.2.7" - sources."fs.realpath-1.0.0" - sources."glob-7.2.3" - sources."glob-parent-6.0.2" - sources."globals-13.20.0" - sources."graphemer-1.4.0" - sources."has-flag-4.0.0" - sources."ignore-5.2.4" - sources."import-fresh-3.3.0" - sources."imurmurhash-0.1.4" - sources."inflight-1.0.6" - sources."inherits-2.0.4" - sources."is-extglob-2.1.1" - sources."is-glob-4.0.3" - sources."is-path-inside-3.0.3" - sources."isexe-2.0.0" - sources."js-yaml-4.1.0" - sources."json-schema-traverse-0.4.1" - sources."json-stable-stringify-without-jsonify-1.0.1" - sources."levn-0.4.1" - sources."locate-path-6.0.0" - sources."lodash.merge-4.6.2" - sources."minimatch-3.1.2" - sources."ms-2.1.2" - sources."nanolru-1.0.0" - sources."natural-compare-1.4.0" - sources."once-1.4.0" - sources."optionator-0.9.1" - sources."p-limit-3.1.0" - sources."p-locate-5.0.0" - sources."parent-module-1.0.1" - sources."path-exists-4.0.0" - sources."path-is-absolute-1.0.1" - sources."path-key-3.1.1" - sources."prelude-ls-1.2.1" - sources."punycode-2.3.0" - sources."queue-microtask-1.2.3" - sources."resolve-from-4.0.0" - sources."reusify-1.0.4" - sources."rimraf-3.0.2" - sources."run-parallel-1.2.0" - sources."shebang-command-2.0.0" - sources."shebang-regex-3.0.0" - sources."strip-ansi-6.0.1" - sources."strip-json-comments-3.1.1" - sources."supports-color-8.1.1" - sources."text-table-0.2.0" - sources."type-check-0.4.0" - sources."type-fest-0.20.2" - sources."uri-js-4.4.1" - sources."which-2.0.2" - sources."word-wrap-1.2.3" - sources."wrappy-1.0.2" - sources."yocto-queue-0.1.0" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "Makes eslint the fastest linter on the planet"; - homepage = "https://github.com/mantoni/eslint_d.js"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; esy = nodeEnv.buildNodePackage { name = "esy"; packageName = "esy"; diff --git a/pkgs/development/tools/eslint_d/default.nix b/pkgs/development/tools/eslint_d/default.nix new file mode 100644 index 000000000000..abaf5857cf79 --- /dev/null +++ b/pkgs/development/tools/eslint_d/default.nix @@ -0,0 +1,24 @@ +{ lib, buildNpmPackage, fetchFromGitHub }: + +buildNpmPackage rec { + pname = "eslint_d"; + version = "12.2.1"; + + src = fetchFromGitHub { + owner = "mantoni"; + repo = "eslint_d.js"; + rev = "v${version}"; + hash = "sha256-rups2y07Y3GkvGt/T9lPG0NUoCxddp/P9PAYczZYNIw="; + }; + + npmDepsHash = "sha256-enHppjkX1syANgFmfAX+LlISyN5ltADjojjrvukAI+I="; + + dontNpmBuild = true; + + meta = with lib; { + description = "Makes eslint the fastest linter on the planet"; + homepage = "github.com/mantoni/eslint_d.js"; + license = licenses.mit; + maintainers = [ maintainers.ehllie ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b4c8dc636006..9ca252894864 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -675,6 +675,8 @@ with pkgs; erosmb = callPackage ../tools/security/erosmb { }; + eslint_d = callPackage ../development/tools/eslint_d { }; + oauth2c = callPackage ../tools/security/oauth2c { }; octosuite = callPackage ../tools/security/octosuite { };