Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-01-25 16:55:40 -08:00
{
lib,
buildNpmPackage,
fetchurl,
2024-01-31 12:42:44 -08:00
git,
2024-01-25 16:55:40 -08:00
installShellFiles,
}:
buildNpmPackage rec {
pname = "graphite-cli";
2025-07-24 21:06:37 -04:00
version = "1.6.7";
2024-01-25 16:55:40 -08:00
src = fetchurl {
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz";
2025-07-24 21:06:37 -04:00
hash = "sha256-OwfnCqxXp7qfDmMaWiuK1bBqPWIunV/26zNsp9zJrLc=";
2024-01-25 16:55:40 -08:00
};
2025-07-24 21:06:37 -04:00
npmDepsHash = "sha256-DCtyA5hseXwvW9lRt60rENusEffOQ7RdLfW7okU7uos=";
2024-01-25 16:55:40 -08:00
postPatch = ''
ln -s ${./package-lock.json} package-lock.json
'';
nativeBuildInputs = [
2024-01-31 12:42:44 -08:00
git
2024-01-25 16:55:40 -08:00
installShellFiles
];
dontNpmBuild = true;
postInstall = ''
installShellCompletion --cmd gt \
--bash <($out/bin/gt completion) \
2024-01-31 12:42:44 -08:00
--fish <(GT_PAGER= $out/bin/gt fish) \
2024-01-25 16:55:40 -08:00
--zsh <(ZSH_NAME=zsh $out/bin/gt completion)
'';
passthru.updateScript = ./update.sh;
meta = {
2024-06-16 22:48:03 +02:00
changelog = "https://graphite.dev/docs/cli-changelog";
2024-01-25 16:55:40 -08:00
description = "CLI that makes creating stacked git changes fast & intuitive";
downloadPage = "https://www.npmjs.com/package/@withgraphite/graphite-cli";
homepage = "https://graphite.dev/docs/graphite-cli";
license = lib.licenses.unfree; # no license specified
mainProgram = "gt";
maintainers = with lib.maintainers; [ joshheinrichs-shopify ];
2024-01-25 16:55:40 -08:00
};
}