at master 50 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildNpmPackage, 5 fetchurl, 6 git, 7 installShellFiles, 8}: 9 10buildNpmPackage rec { 11 pname = "graphite-cli"; 12 version = "1.6.8"; 13 14 src = fetchurl { 15 url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-${version}.tgz"; 16 hash = "sha256-HkxhPx38FjwrwPGhXSWw21mizjuWblcPxWFLYUU7Oys="; 17 }; 18 19 npmDepsHash = "sha256-28jOlUaVo8HN5HF1EvcPAu9qYJOsby5gt9rCGbIOMRU="; 20 21 postPatch = '' 22 ln -s ${./package-lock.json} package-lock.json 23 ''; 24 25 nativeBuildInputs = [ 26 git 27 installShellFiles 28 ]; 29 30 dontNpmBuild = true; 31 32 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 33 installShellCompletion --cmd gt \ 34 --bash <($out/bin/gt completion) \ 35 --fish <(GT_PAGER= $out/bin/gt fish) \ 36 --zsh <(ZSH_NAME=zsh $out/bin/gt completion) 37 ''; 38 39 passthru.updateScript = ./update.sh; 40 41 meta = { 42 changelog = "https://graphite.dev/docs/cli-changelog"; 43 description = "CLI that makes creating stacked git changes fast & intuitive"; 44 downloadPage = "https://www.npmjs.com/package/@withgraphite/graphite-cli"; 45 homepage = "https://graphite.dev/docs/graphite-cli"; 46 license = lib.licenses.unfree; # no license specified 47 mainProgram = "gt"; 48 maintainers = with lib.maintainers; [ joshheinrichs-shopify ]; 49 }; 50}