From 568ee7bc40b9f4ac984ecafd40a3e0fb8db367f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 14 Sep 2023 08:16:43 -0700 Subject: [PATCH] prettier-d-slim: use buildNpmPackage --- pkgs/by-name/pr/prettier-d-slim/package.nix | 28 ++++++++++++++++ pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 33 ------------------- 4 files changed, 29 insertions(+), 34 deletions(-) create mode 100644 pkgs/by-name/pr/prettier-d-slim/package.nix diff --git a/pkgs/by-name/pr/prettier-d-slim/package.nix b/pkgs/by-name/pr/prettier-d-slim/package.nix new file mode 100644 index 000000000000..3b92503d7423 --- /dev/null +++ b/pkgs/by-name/pr/prettier-d-slim/package.nix @@ -0,0 +1,28 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "prettier-d-slim"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "mikew"; + repo = "prettier_d_slim"; + rev = "v${version}"; + hash = "sha256-M+qlFKtIro3geVsVaYu6dIfOrJIlUQY98LSBikKNV/I="; + }; + + npmDepsHash = "sha256-zkyB3PYpfeEw5U70KewxIWd4eImIbTgy+e88264sotc="; + + dontNpmBuild = true; + + meta = { + description = "Makes prettier fast"; + homepage = "https://github.com/mikew/prettier_d_slim"; + license = lib.licenses.mit; + mainProgram = "prettier_d_slim"; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index fbc2118442ae..b9dc543df5dc 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -98,6 +98,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 + prettier_d_slim = pkgs.prettier-d-slim; # added 2023-09-14 inherit (pkgs) quicktype; # added 2023-09-09 inherit (pkgs) react-static; # added 2023-08-21 readability-cli = pkgs.readability-cli; # Added 2023-06-12 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 1495f5c67d4c..6435c66d40bd 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -202,7 +202,6 @@ , "postcss-cli" , "prebuild-install" , "prettier" -, "prettier_d_slim" , "prettier-plugin-toml" , "prisma" , "@prisma/language-server" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 13ddaa66f59c..354c473d635d 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -101421,39 +101421,6 @@ in bypassCache = true; reconstructLock = true; }; - prettier_d_slim = nodeEnv.buildNodePackage { - name = "prettier_d_slim"; - packageName = "prettier_d_slim"; - version = "1.2.0"; - src = fetchurl { - url = "https://registry.npmjs.org/prettier_d_slim/-/prettier_d_slim-1.2.0.tgz"; - sha512 = "Wq/Qida9MweJX7dKjlNeJ9Ppfeu4YPWY2947x1xev2RXjimvv2QOBRQJhGAir/QZ+WJnrU82e9O67Uqu8JgbZw=="; - }; - dependencies = [ - sources."camelize-1.0.1" - sources."core_d-3.2.0" - sources."function-bind-1.1.1" - sources."has-1.0.3" - sources."has-flag-4.0.0" - sources."is-core-module-2.13.0" - sources."minimist-1.2.8" - sources."nanolru-1.0.0" - sources."path-parse-1.0.7" - sources."prettier-2.8.8" - sources."resolve-1.22.4" - sources."supports-color-8.1.1" - sources."supports-preserve-symlinks-flag-1.0.0" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "Makes prettier fast"; - homepage = "https://github.com/mikew/prettier_d_slim"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; prettier-plugin-toml = nodeEnv.buildNodePackage { name = "prettier-plugin-toml"; packageName = "prettier-plugin-toml";