audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / gr / graphite-cli / package.nix
blob34d94ab3c8d05caf60686716df902e4031b2eb11
2   lib,
3   buildNpmPackage,
4   fetchurl,
5   git,
6   installShellFiles,
7 }:
9 buildNpmPackage rec {
10   pname = "graphite-cli";
11   version = "1.4.11";
13   src = fetchurl {
14     url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz";
15     hash = "sha256-gky/nv7GS6hR3Zjm+J1Ob0SSbw4PneOm54WK7Ls9i9g=";
16   };
18   npmDepsHash = "sha256-WvLASGTsNbM/IC+qyOAruiYKnHSx0bGc03Bh1wtnPn8=";
20   postPatch = ''
21     ln -s ${./package-lock.json} package-lock.json
22   '';
24   nativeBuildInputs = [
25     git
26     installShellFiles
27   ];
29   dontNpmBuild = true;
31   postInstall = ''
32     installShellCompletion --cmd gt \
33       --bash <($out/bin/gt completion) \
34       --fish <(GT_PAGER= $out/bin/gt fish) \
35       --zsh <(ZSH_NAME=zsh $out/bin/gt completion)
36   '';
38   passthru.updateScript = ./update.sh;
40   meta = {
41     changelog = "https://graphite.dev/docs/cli-changelog";
42     description = "CLI that makes creating stacked git changes fast & intuitive";
43     downloadPage = "https://www.npmjs.com/package/@withgraphite/graphite-cli";
44     homepage = "https://graphite.dev/docs/graphite-cli";
45     license = lib.licenses.unfree; # no license specified
46     mainProgram = "gt";
47     maintainers = with lib.maintainers; [ diegs ];
48   };