Skip to content

Commit a9b0cdb

Browse files
authored
Graphite CLI module (#468)
2 parents dab4098 + a324d22 commit a9b0cdb

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

pkgs/modules/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ let
158158
nodepkgs = pkgs.nodePackages;
159159
})
160160
(import ./replit-rtld-loader)
161+
(import ./graphite-cli)
161162
];
162163

163164
activeModules = listToAttrs (
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{ pkgs, lib, ... }:
2+
3+
let
4+
version = "1.7.4";
5+
graphite-cli = pkgs.stdenv.mkDerivation {
6+
pname = "graphite-cli";
7+
version = "1.7.4";
8+
9+
src = pkgs.fetchurl {
10+
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-1.7.4.tgz";
11+
hash = "sha256-srufROZk8DYzxDV0j6FhyD0afZ70rv7wUHS9TbGTopg=";
12+
};
13+
14+
buildInputs = [ pkgs.nodejs ];
15+
16+
installPhase = ''
17+
mkdir -p $out/lib/node_modules/@withgraphite/graphite-cli
18+
cp -r . $out/lib/node_modules/@withgraphite/graphite-cli
19+
chmod +x $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js
20+
mkdir -p $out/bin
21+
ln -s $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js $out/bin/gt
22+
ln -s $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js $out/bin/graphite
23+
'';
24+
};
25+
in
26+
{
27+
id = "graphite-cli";
28+
name = "Graphite CLI";
29+
description = ''
30+
Graphite CLI is a command-line tool that helps developers manage stacked pull requests
31+
(also called stacked diffs), making it easier to break large changes into smaller,
32+
reviewable pieces that can be submitted and merged incrementally.
33+
'';
34+
displayVersion = version;
35+
36+
replit.packages = [
37+
graphite-cli
38+
];
39+
40+
}

0 commit comments

Comments
 (0)