2024-02-07 01:22:34 +00:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchurl
|
|
|
|
, git
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildNpmPackage rec {
|
|
|
|
pname = "graphite-cli";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.3.4";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-Rc/dj3r3EpMbxx9rYj4kXnstmUGLR46U+7v6n1jSaiQ=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
npmDepsHash = "sha256-w9d96SMLISPua9LMZscDjL7L8mGPO1RGyNjg8eU40hw=";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
ln -s ${./package-lock.json} package-lock.json
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
git
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
dontNpmBuild = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd gt \
|
|
|
|
--bash <($out/bin/gt completion) \
|
|
|
|
--fish <(GT_PAGER= $out/bin/gt fish) \
|
|
|
|
--zsh <(ZSH_NAME=zsh $out/bin/gt completion)
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
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";
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = with lib.maintainers; [ diegs ];
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
}
|