gitmoji-cli: use fetchYarnDeps

This commit is contained in:
Robert Schütz 2023-09-23 18:34:51 -07:00
parent 4601133c0b
commit 59c4461cf8
5 changed files with 76 additions and 325 deletions

View File

@ -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 ];
};
})

View File

@ -72,6 +72,7 @@ mapAliases {
inherit (pkgs) firebase-tools; # added 2023-08-18
flood = pkgs.flood; # Added 2023-07-25
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

View File

@ -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";

View File

@ -125,7 +125,6 @@
, "git-run"
, "git-standup"
, "@gitbeaker/cli"
, "gitmoji-cli"
, "gramma"
, "grammarly-languageserver"
, "graphql"

View File

@ -79732,329 +79732,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";