From d84e7a36ca8bc8d622bd87b715a33426e82f0632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 17 Aug 2023 21:29:14 -0700 Subject: [PATCH] carto: use buildNpmPackage --- pkgs/development/node-packages/aliases.nix | 1 + .../node-packages/node-packages.json | 1 - .../node-packages/node-packages.nix | 89 ------------------- pkgs/development/tools/carto/default.nix | 29 ++++++ pkgs/top-level/all-packages.nix | 2 + 5 files changed, 32 insertions(+), 90 deletions(-) create mode 100644 pkgs/development/tools/carto/default.nix diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 1de90bcb0463..635e5dbc9d72 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -49,6 +49,7 @@ mapAliases { balanceofsatoshis = pkgs.balanceofsatoshis; # added 2023-07-31 bibtex-tidy = pkgs.bibtex-tidy; # added 2023-07-30 bitwarden-cli = pkgs.bitwarden-cli; # added 2023-07-25 + inherit (pkgs) carto; # added 2023-08-17 castnow = pkgs.castnow; # added 2023-07-30 eask = pkgs.eask; # added 2023-08-17 eslint_d = pkgs.eslint_d; # Added 2023-05-26 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 61c70c09bd5f..809dc75746cd 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -41,7 +41,6 @@ , "browser-sync" , "btc-rpc-explorer" , "carbon-now-cli" -, "carto" , "cdk8s-cli" , "cdktf-cli" , "clean-css-cli" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index e930cbb8f9c0..5e140002350d 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -90994,95 +90994,6 @@ in bypassCache = true; reconstructLock = true; }; - carto = nodeEnv.buildNodePackage { - name = "carto"; - packageName = "carto"; - version = "1.2.0"; - src = fetchurl { - url = "https://registry.npmjs.org/carto/-/carto-1.2.0.tgz"; - sha512 = "WMWMOJGgBiKddgYpOs8Q1+wBb3oJCWtXKHh2TTCVjIo1MyfzVOLBXFE8zKPNkQUR4rmqi/SDaSwYQ5QT/YhjuQ=="; - }; - dependencies = [ - sources."ansi-regex-3.0.1" - sources."argparse-1.0.10" - sources."camelcase-5.3.1" - sources."chroma-js-1.3.7" - sources."cliui-4.1.0" - sources."code-point-at-1.1.0" - sources."cross-spawn-6.0.5" - sources."decamelize-1.2.0" - sources."end-of-stream-1.4.4" - sources."esprima-4.0.1" - sources."execa-1.0.0" - sources."find-up-3.0.0" - sources."get-caller-file-1.0.3" - sources."get-stream-4.1.0" - sources."hsluv-0.0.3" - sources."invert-kv-2.0.0" - sources."is-fullwidth-code-point-1.0.0" - sources."is-stream-1.1.0" - sources."isexe-2.0.0" - sources."js-yaml-3.12.2" - sources."lcid-2.0.0" - sources."locate-path-3.0.0" - sources."lodash-4.17.21" - sources."map-age-cleaner-0.1.3" - sources."mapnik-reference-8.10.0" - sources."mem-4.3.0" - sources."mimic-fn-2.1.0" - sources."nice-try-1.0.5" - sources."npm-run-path-2.0.2" - sources."number-is-nan-1.0.1" - sources."once-1.4.0" - sources."os-locale-3.1.0" - sources."p-defer-1.0.0" - sources."p-finally-1.0.0" - sources."p-is-promise-2.1.0" - sources."p-limit-2.3.0" - sources."p-locate-3.0.0" - sources."p-try-2.2.0" - sources."path-exists-3.0.0" - sources."path-key-2.0.1" - sources."pump-3.0.0" - sources."require-directory-2.1.1" - sources."require-main-filename-1.0.1" - sources."semver-5.6.0" - sources."set-blocking-2.0.0" - sources."shebang-command-1.2.0" - sources."shebang-regex-1.0.0" - sources."signal-exit-3.0.7" - sources."sprintf-js-1.0.3" - (sources."string-width-2.1.1" // { - dependencies = [ - sources."is-fullwidth-code-point-2.0.0" - ]; - }) - sources."strip-ansi-4.0.0" - sources."strip-eof-1.0.0" - sources."which-1.3.1" - sources."which-module-2.0.1" - (sources."wrap-ansi-2.1.0" // { - dependencies = [ - sources."ansi-regex-2.1.1" - sources."string-width-1.0.2" - sources."strip-ansi-3.0.1" - ]; - }) - sources."wrappy-1.0.2" - sources."y18n-4.0.3" - sources."yargs-12.0.5" - sources."yargs-parser-11.1.1" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "Mapnik Stylesheet Compiler"; - homepage = "https://github.com/mapbox/carto#readme"; - license = "Apache-2.0"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; cdk8s-cli = nodeEnv.buildNodePackage { name = "cdk8s-cli"; packageName = "cdk8s-cli"; diff --git a/pkgs/development/tools/carto/default.nix b/pkgs/development/tools/carto/default.nix new file mode 100644 index 000000000000..f48244111a84 --- /dev/null +++ b/pkgs/development/tools/carto/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildNpmPackage +, fetchFromGitHub +}: + +buildNpmPackage rec { + pname = "carto"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "mapbox"; + repo = "carto"; + rev = "v${version}"; + hash = "sha256-TylMgb2EI52uFmVeMJiQltgNCSh6MutFwUjsYC7gfEA="; + }; + + npmDepsHash = "sha256-8M9hze71bQWhyxcXeI/EOr0SQ+tx8Lb9LfvnGxYYo0A="; + + dontNpmBuild = true; + + meta = { + changelog = "https://github.com/mapbox/carto/blob/${src.rev}/CHANGELOG.md"; + description = "Mapnik stylesheet compiler"; + homepage = "https://github.com/mapbox/carto"; + license = lib.licenses.asl20; + mainProgram = "carto"; + maintainers = with lib.maintainers; [ Luflosi ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9ab55887651e..07c4641ab60b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18742,6 +18742,8 @@ with pkgs; cadre = callPackage ../development/tools/cadre { }; + carto = callPackage ../development/tools/carto { }; + catnip = callPackage ../tools/audio/catnip { }; catnip-gtk4 = callPackage ../tools/audio/catnip-gtk4 { };