depot/third_party/nixpkgs/pkgs/by-name/gr/graphite-cli/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

48 lines
1.2 KiB
Nix

{ lib
, buildNpmPackage
, fetchurl
, git
, installShellFiles
}:
buildNpmPackage rec {
pname = "graphite-cli";
version = "1.3.10";
src = fetchurl {
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz";
hash = "sha256-pGUIF6X7xmhoccjDRGYMPB004Uh1X3lSSyRG2xHk4oc=";
};
npmDepsHash = "sha256-E0L/akAEy24edwuiQ3TT5yxG6h5kJcQdkzPPp1HAgOI=";
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 = {
changelog = "https://graphite.dev/docs/cli-changelog";
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 ];
};
}