From 8e49af0f3e7c305cd969d3571310b6d434832ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 31 Jul 2023 12:44:26 -0700 Subject: [PATCH] hueadm: use buildNpmPackage --- pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 62 ------------------- pkgs/tools/misc/hueadm/default.nix | 27 ++++++++ pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 29 insertions(+), 64 deletions(-) create mode 100644 pkgs/tools/misc/hueadm/default.nix diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index aef00f677cc3..8ca4cc1af1dc 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -49,6 +49,7 @@ mapAliases { eslint_d = pkgs.eslint_d; # Added 2023-05-26 flood = pkgs.flood; # Added 2023-07-25 gtop = pkgs.gtop; # added 2023-07-31 + hueadm = pkgs.hueadm; # added 2023-07-31 karma = pkgs.karma-runner; # added 2023-07-29 manta = pkgs.node-manta; # Added 2023-05-06 markdownlint-cli = pkgs.markdownlint-cli; # added 2023-07-29 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 3ba587e27d5c..365af1cc98a2 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -170,7 +170,6 @@ , "hsd" , "hs-airdrop" , "hs-client" -, "hueadm" , "hyperpotamus" , "ijavascript" , "inliner" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 680595413c63..c6a4706f69c2 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -111881,68 +111881,6 @@ in bypassCache = true; reconstructLock = true; }; - hueadm = nodeEnv.buildNodePackage { - name = "hueadm"; - packageName = "hueadm"; - version = "1.2.1"; - src = fetchurl { - url = "https://registry.npmjs.org/hueadm/-/hueadm-1.2.1.tgz"; - sha512 = "5ZoQ6vz1oWxklwps0bjsSyv30jOQ7ZYC+H4W/UeYLOYNwR2oQH8pjze74F1iT4CAyx3jmXmAwZl1LxfNUWL1Lg=="; - }; - dependencies = [ - sources."abort-controller-3.0.0" - sources."argparse-1.0.10" - sources."assert-plus-1.0.0" - sources."autocast-0.0.4" - sources."balanced-match-1.0.2" - sources."base64-js-1.5.1" - sources."brace-expansion-1.1.11" - sources."buffer-6.0.3" - sources."cmdln-4.4.0" - sources."color-convert-2.0.1" - sources."color-name-1.1.4" - sources."concat-map-0.0.1" - sources."core-util-is-1.0.2" - sources."css-color-names-1.0.1" - sources."dashdash-1.14.1" - sources."deepmerge-3.3.0" - sources."event-target-shim-5.0.1" - sources."events-3.3.0" - sources."extsprintf-1.4.1" - sources."fs.realpath-1.0.0" - sources."fuzzyset.js-0.0.1" - sources."glob-7.2.3" - sources."hue-sdk-0.1.0" - sources."ieee754-1.2.1" - sources."inflight-1.0.6" - sources."inherits-2.0.4" - sources."latest-0.2.0" - sources."lstream-0.0.4" - sources."minimatch-3.1.2" - sources."mired-0.0.0" - sources."npm-2.15.12" - sources."once-1.4.0" - sources."path-is-absolute-1.0.1" - sources."process-0.11.10" - sources."readable-stream-4.4.2" - sources."safe-buffer-5.2.1" - sources."sprintf-js-1.0.3" - sources."string_decoder-1.3.0" - sources."tabula-1.10.0" - sources."verror-1.10.1" - sources."wrappy-1.0.2" - sources."yamljs-0.3.0" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "A command line management interface to phillips hue"; - homepage = "https://github.com/bahamas10/hueadm#readme"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; hyperpotamus = nodeEnv.buildNodePackage { name = "hyperpotamus"; packageName = "hyperpotamus"; diff --git a/pkgs/tools/misc/hueadm/default.nix b/pkgs/tools/misc/hueadm/default.nix new file mode 100644 index 000000000000..393f4baa955b --- /dev/null +++ b/pkgs/tools/misc/hueadm/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "hueadm"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "bahamas10"; + repo = "hueadm"; + rev = "v${version}"; + hash = "sha256-QNjkfE8V/lUkYP8NAf11liKXILBk3wSNm3NSrgaH+nc="; + }; + + npmDepsHash = "sha256-EbwHbPe8QvT6ekH20q+ihGmwpAHykwkwoJ6vwAf0FlA="; + + dontNpmBuild = true; + + meta = { + description = "Command line management interface to Philips Hue"; + homepage = "https://github.com/bahamas10/hueadm"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ infinisil ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b2b5ef643f7..0936a9f1956c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32124,7 +32124,7 @@ with pkgs; hue-cli = callPackage ../tools/networking/hue-cli { }; - inherit (nodePackages) hueadm; + hueadm = callPackage ../tools/misc/hueadm { }; hugin = callPackage ../applications/graphics/hugin { wxGTK = wxGTK32;