nixpkgs/pkgs/by-name/gr/graphite-cli/package.nix

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

48 lines
1.1 KiB
Nix
Raw Normal View History

2024-01-26 00:55:40 +00:00
{ lib
, buildNpmPackage
, fetchurl
2024-01-31 20:42:44 +00:00
, git
2024-01-26 00:55:40 +00:00
, installShellFiles
}:
buildNpmPackage rec {
pname = "graphite-cli";
2024-06-03 10:33:22 +00:00
version = "1.3.6";
2024-01-26 00:55:40 +00:00
src = fetchurl {
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz";
2024-06-03 10:33:22 +00:00
hash = "sha256-rD/YWFRHzoM9Gsd9tnCF56RChckaeWGFphYgHa0UvUU=";
2024-01-26 00:55:40 +00:00
};
2024-06-03 10:33:22 +00:00
npmDepsHash = "sha256-WyV0f5thWG7hg7Vm1UUIlcFCgP83HfXQFBUVHcQdjRo=";
2024-01-26 00:55:40 +00:00
postPatch = ''
ln -s ${./package-lock.json} package-lock.json
'';
nativeBuildInputs = [
2024-01-31 20:42:44 +00:00
git
2024-01-26 00:55:40 +00:00
installShellFiles
];
dontNpmBuild = true;
postInstall = ''
installShellCompletion --cmd gt \
--bash <($out/bin/gt completion) \
2024-01-31 20:42:44 +00:00
--fish <(GT_PAGER= $out/bin/gt fish) \
2024-01-26 00:55:40 +00:00
--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";
maintainers = with lib.maintainers; [ diegs ];
2024-01-26 00:55:40 +00:00
};
}