diff options
author | Robert Schütz <nix@dotlambda.de> | 2023-09-25 00:31:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 00:31:08 +0000 |
commit | a35308b0dc144b4cc3a17301013bdb95987d3104 (patch) | |
tree | 0a153f203a13dd6e69354dd553f4feb2f2eb5eec | |
parent | 5c7689fd633cd6034d369a30e0ceaf3e5183dbd1 (diff) | |
parent | 59c4461cf8ce800653f8783b531825431b5adfad (diff) |
Merge pull request #256996 from dotlambda/gitmoji-cli-fetchYarnDeps
gitmoji-cli: use fetchYarnDeps
-rw-r--r-- | pkgs/by-name/gi/gitmoji-cli/package.nix | 75 | ||||
-rw-r--r-- | pkgs/development/node-packages/aliases.nix | 1 | ||||
-rw-r--r-- | pkgs/development/node-packages/main-programs.nix | 1 | ||||
-rw-r--r-- | pkgs/development/node-packages/node-packages.json | 1 | ||||
-rw-r--r-- | pkgs/development/node-packages/node-packages.nix | 323 |
5 files changed, 76 insertions, 325 deletions
diff --git a/pkgs/by-name/gi/gitmoji-cli/package.nix b/pkgs/by-name/gi/gitmoji-cli/package.nix new file mode 100644 index 0000000000000..a6f23e10bce0b --- /dev/null +++ b/pkgs/by-name/gi/gitmoji-cli/package.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchYarnDeps +, makeWrapper +, nodejs +, prefetch-yarn-deps +, yarn +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "gitmoji-cli"; + version = "8.5.0"; + + src = fetchFromGitHub { + owner = "carloscuesta"; + repo = "gitmoji-cli"; + rev = "v${finalAttrs.version}"; + hash = "sha256-ZM6jOi0FnomkIZeK6ln1Z0d6R5cjav67qyly3yqR1HQ="; + }; + + offlineCache = fetchYarnDeps { + yarnLock = "${finalAttrs.src}/yarn.lock"; + hash = "sha256-HSAWFVOTlXlG7N5591hpfPAYaSrP413upW5u/HN9X2o="; + }; + + nativeBuildInputs = [ + makeWrapper + nodejs + prefetch-yarn-deps + yarn + ]; + + configurePhase = '' + runHook preConfigure + + export HOME=$(mktemp -d) + yarn config --offline set yarn-offline-mirror $offlineCache + fixup-yarn-lock yarn.lock + yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install + patchShebangs node_modules + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + yarn --offline build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + yarn --offline --production install + + mkdir -p "$out/lib/node_modules/gitmoji-cli" + cp -r lib node_modules "$out/lib/node_modules/gitmoji-cli" + + makeWrapper "${nodejs}/bin/node" "$out/bin/gitmoji" \ + --add-flags "$out/lib/node_modules/gitmoji-cli/lib/cli.js" + + runHook postInstall + ''; + + meta = { + description = "Gitmoji client for using emojis on commit messages"; + homepage = "https://github.com/carloscuesta/gitmoji-cli"; + license = lib.licenses.mit; + mainProgram = "gitmoji"; + maintainers = with lib.maintainers; [ nequissimus ]; + }; +}) diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 7601196af5a1d..9349a9d6a0454 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -73,6 +73,7 @@ mapAliases { flood = pkgs.flood; # Added 2023-07-25 generator-code = throw "generator-code was removed because it provides no executable"; # added 2023-09-24 git-ssb = throw "git-ssb was removed because it was broken"; # added 2023-08-21 + inherit (pkgs) gitmoji-cli; # added 2023-09-23 glob = pkgs.node-glob; # added 2023-08-18 inherit (pkgs) gqlint; # added 2023-08-19 inherit (pkgs) graphqurl; # added 2023-08-19 diff --git a/pkgs/development/node-packages/main-programs.nix b/pkgs/development/node-packages/main-programs.nix index e4aa11738cce8..2ca45fd86ec21 100644 --- a/pkgs/development/node-packages/main-programs.nix +++ b/pkgs/development/node-packages/main-programs.nix @@ -37,7 +37,6 @@ fkill-cli = "fkill"; fleek-cli = "fleek"; git-run = "gr"; - gitmoji-cli = "gitmoji"; graphql-cli = "graphql"; graphql-language-service-cli = "graphql-lsp"; grunt-cli = "grunt"; diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index db78aaee2245d..04de42dd00c67 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -124,7 +124,6 @@ , "git-run" , "git-standup" , "@gitbeaker/cli" -, "gitmoji-cli" , "gramma" , "grammarly-languageserver" , "graphql" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 5abe9c5629f27..19190ea18b0ca 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -78892,329 +78892,6 @@ in bypassCache = true; reconstructLock = true; }; - gitmoji-cli = nodeEnv.buildNodePackage { - name = "gitmoji-cli"; - packageName = "gitmoji-cli"; - version = "8.5.0"; - src = fetchurl { - url = "https://registry.npmjs.org/gitmoji-cli/-/gitmoji-cli-8.5.0.tgz"; - sha512 = "ZSplvgm8UiAjsWBOxYAfbLj8JTMFj5TjB6yM7RFlqEfsFMgP0fhIPpgnHU5aMiyVyvX6jBRVf1hzjrmP3/cgiA=="; - }; - dependencies = [ - sources."@ljharb/through-2.3.9" - sources."@pnpm/config.env-replace-1.1.0" - (sources."@pnpm/network.ca-file-1.0.2" // { - dependencies = [ - sources."graceful-fs-4.2.10" - ]; - }) - sources."@pnpm/npm-conf-2.2.2" - sources."@sindresorhus/is-5.6.0" - sources."@szmarczak/http-timer-5.0.1" - sources."@tootallnate/quickjs-emscripten-0.23.0" - sources."@types/http-cache-semantics-4.0.2" - sources."agent-base-7.1.0" - sources."ajv-8.12.0" - sources."ajv-formats-2.1.1" - sources."ansi-align-3.0.1" - (sources."ansi-escapes-4.3.2" // { - dependencies = [ - sources."type-fest-0.21.3" - ]; - }) - sources."ansi-regex-5.0.1" - sources."ansi-styles-4.3.0" - sources."ast-types-0.13.4" - sources."atomically-2.0.2" - sources."base64-js-1.5.1" - sources."basic-ftp-5.0.3" - sources."bl-4.1.0" - (sources."boxen-7.1.1" // { - dependencies = [ - sources."ansi-regex-6.0.1" - sources."ansi-styles-6.2.1" - sources."emoji-regex-9.2.2" - sources."string-width-5.1.2" - sources."strip-ansi-7.1.0" - sources."wrap-ansi-8.1.0" - ]; - }) - sources."buffer-5.7.1" - sources."cacheable-lookup-7.0.0" - (sources."cacheable-request-10.2.13" // { - dependencies = [ - sources."get-stream-6.0.1" - ]; - }) - sources."camelcase-7.0.1" - sources."chalk-5.3.0" - sources."chardet-0.7.0" - sources."ci-info-3.8.0" - sources."cli-boxes-3.0.0" - sources."cli-cursor-3.1.0" - sources."cli-spinners-2.9.1" - sources."cli-width-4.1.0" - sources."clone-1.0.4" - sources."color-convert-2.0.1" - sources."color-name-1.1.4" - sources."conf-11.0.2" - (sources."config-chain-1.1.13" // { - dependencies = [ - sources."ini-1.3.8" - ]; - }) - (sources."configstore-6.0.0" // { - dependencies = [ - sources."dot-prop-6.0.1" - ]; - }) - sources."cross-spawn-7.0.3" - (sources."crypto-random-string-4.0.0" // { - dependencies = [ - sources."type-fest-1.4.0" - ]; - }) - sources."data-uri-to-buffer-4.0.1" - sources."debounce-fn-5.1.2" - sources."debug-4.3.4" - (sources."decompress-response-6.0.0" // { - dependencies = [ - sources."mimic-response-3.1.0" - ]; - }) - sources."deep-extend-0.6.0" - sources."defaults-1.0.4" - sources."defer-to-connect-2.0.1" - sources."degenerator-5.0.1" - sources."dot-prop-7.2.0" - sources."eastasianwidth-0.2.0" - sources."emoji-regex-8.0.0" - sources."env-paths-3.0.0" - sources."escape-goat-4.0.0" - sources."escape-string-regexp-5.0.0" - sources."escodegen-2.1.0" - sources."esprima-4.0.1" - sources."estraverse-5.3.0" - sources."esutils-2.0.3" - sources."execa-8.0.1" - sources."external-editor-3.1.0" - sources."fast-deep-equal-3.1.3" - sources."fetch-blob-3.2.0" - sources."figures-5.0.0" - sources."form-data-encoder-2.1.4" - sources."formdata-polyfill-4.0.10" - sources."fs-extra-8.1.0" - sources."fuse.js-6.6.2" - sources."get-stream-8.0.1" - (sources."get-uri-6.0.1" // { - dependencies = [ - sources."data-uri-to-buffer-5.0.1" - ]; - }) - sources."global-dirs-3.0.1" - (sources."got-12.6.1" // { - dependencies = [ - sources."get-stream-6.0.1" - ]; - }) - sources."graceful-fs-4.2.11" - sources."has-flag-4.0.0" - sources."has-yarn-3.0.0" - sources."http-cache-semantics-4.1.1" - sources."http-proxy-agent-7.0.0" - sources."http2-wrapper-2.2.0" - sources."https-proxy-agent-7.0.2" - sources."human-signals-5.0.0" - sources."iconv-lite-0.4.24" - sources."ieee754-1.2.1" - sources."import-lazy-4.0.0" - sources."imurmurhash-0.1.4" - sources."inherits-2.0.4" - sources."ini-2.0.0" - (sources."inquirer-9.2.11" // { - dependencies = [ - sources."is-unicode-supported-0.1.0" - (sources."ora-5.4.1" // { - dependencies = [ - sources."chalk-4.1.2" - ]; - }) - ]; - }) - (sources."inquirer-autocomplete-prompt-3.0.0" // { - dependencies = [ - sources."ansi-escapes-6.2.0" - sources."run-async-2.4.1" - sources."type-fest-3.13.1" - ]; - }) - sources."ip-1.1.8" - sources."is-ci-3.0.1" - sources."is-fullwidth-code-point-3.0.0" - sources."is-installed-globally-0.4.0" - sources."is-interactive-1.0.0" - sources."is-npm-6.0.0" - sources."is-obj-2.0.0" - sources."is-path-inside-3.0.3" - sources."is-stream-3.0.0" - sources."is-typedarray-1.0.0" - sources."is-unicode-supported-1.3.0" - sources."is-yarn-global-0.4.1" - sources."isexe-2.0.0" - sources."json-buffer-3.0.1" - sources."json-schema-traverse-1.0.0" - sources."json-schema-typed-8.0.1" - sources."jsonfile-4.0.0" - sources."keyv-4.5.3" - sources."latest-version-7.0.0" - sources."lodash-4.17.21" - (sources."log-symbols-4.1.0" // { - dependencies = [ - sources."chalk-4.1.2" - sources."is-unicode-supported-0.1.0" - ]; - }) - sources."lowercase-keys-3.0.0" - sources."lru-cache-6.0.0" - sources."meow-12.1.1" - sources."merge-stream-2.0.0" - sources."mimic-fn-4.0.0" - sources."mimic-response-4.0.0" - sources."minimist-1.2.8" - sources."ms-2.1.2" - sources."mute-stream-1.0.0" - sources."netmask-2.0.2" - sources."node-domexception-1.0.0" - sources."node-fetch-3.3.2" - sources."normalize-url-8.0.0" - (sources."npm-run-path-5.1.0" // { - dependencies = [ - sources."path-key-4.0.0" - ]; - }) - sources."onetime-6.0.0" - (sources."ora-7.0.1" // { - dependencies = [ - sources."ansi-regex-6.0.1" - sources."cli-cursor-4.0.0" - sources."emoji-regex-10.2.1" - sources."is-interactive-2.0.0" - sources."log-symbols-5.1.0" - sources."mimic-fn-2.1.0" - sources."onetime-5.1.2" - sources."restore-cursor-4.0.0" - sources."signal-exit-3.0.7" - sources."string-width-6.1.0" - sources."strip-ansi-7.1.0" - ]; - }) - sources."os-tmpdir-1.0.2" - sources."p-cancelable-3.0.0" - sources."pac-proxy-agent-7.0.1" - sources."pac-resolver-7.0.0" - sources."package-json-8.1.1" - sources."path-exists-5.0.0" - sources."path-key-3.1.1" - sources."picocolors-1.0.0" - sources."proto-list-1.2.4" - (sources."proxy-agent-6.3.1" // { - dependencies = [ - sources."lru-cache-7.18.3" - ]; - }) - sources."proxy-from-env-1.1.0" - sources."punycode-2.3.0" - sources."pupa-3.1.0" - sources."quick-lru-5.1.1" - (sources."rc-1.2.8" // { - dependencies = [ - sources."ini-1.3.8" - ]; - }) - sources."readable-stream-3.6.2" - sources."registry-auth-token-5.0.2" - sources."registry-url-6.0.1" - sources."require-from-string-2.0.2" - sources."resolve-alpn-1.2.1" - sources."responselike-3.0.0" - (sources."restore-cursor-3.1.0" // { - dependencies = [ - sources."mimic-fn-2.1.0" - sources."onetime-5.1.2" - sources."signal-exit-3.0.7" - ]; - }) - sources."run-async-3.0.0" - sources."rxjs-7.8.1" - sources."safe-buffer-5.2.1" - sources."safer-buffer-2.1.2" - sources."semver-7.5.4" - sources."semver-diff-4.0.0" - sources."shebang-command-2.0.0" - sources."shebang-regex-3.0.0" - sources."signal-exit-4.1.0" - sources."smart-buffer-4.2.0" - (sources."socks-2.7.1" // { - dependencies = [ - sources."ip-2.0.0" - ]; - }) - sources."socks-proxy-agent-8.0.2" - sources."source-map-0.6.1" - (sources."stdin-discarder-0.1.0" // { - dependencies = [ - sources."bl-5.1.0" - sources."buffer-6.0.3" - ]; - }) - sources."string-width-4.2.3" - sources."string_decoder-1.3.0" - sources."strip-ansi-6.0.1" - sources."strip-final-newline-3.0.0" - sources."strip-json-comments-2.0.1" - sources."stubborn-fs-1.2.5" - sources."supports-color-7.2.0" - sources."tmp-0.0.33" - sources."tslib-2.6.2" - sources."type-fest-2.19.0" - sources."typedarray-to-buffer-3.1.5" - sources."unique-string-3.0.0" - sources."universalify-0.1.2" - sources."update-notifier-6.0.2" - sources."uri-js-4.4.1" - sources."util-deprecate-1.0.2" - sources."validator-13.11.0" - sources."wcwidth-1.0.1" - sources."web-streams-polyfill-3.2.1" - sources."when-exit-2.1.1" - sources."which-2.0.2" - (sources."widest-line-4.0.1" // { - dependencies = [ - sources."ansi-regex-6.0.1" - sources."emoji-regex-9.2.2" - sources."string-width-5.1.2" - sources."strip-ansi-7.1.0" - ]; - }) - sources."wrap-ansi-6.2.0" - (sources."write-file-atomic-3.0.3" // { - dependencies = [ - sources."signal-exit-3.0.7" - ]; - }) - sources."xdg-basedir-5.1.0" - sources."yallist-4.0.0" - ]; - buildInputs = globalBuildInputs; - meta = { - description = "A gitmoji client for using emojis on commit messages."; - homepage = "https://github.com/carloscuesta/gitmoji-cli#readme"; - license = "MIT"; - }; - production = true; - bypassCache = true; - reconstructLock = true; - }; gramma = nodeEnv.buildNodePackage { name = "gramma"; packageName = "gramma"; |