Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ let
nodepkgs = pkgs.nodePackages;
})
(import ./replit-rtld-loader)
(import ./graphite-cli)
];

activeModules = listToAttrs (
Expand Down
40 changes: 40 additions & 0 deletions pkgs/modules/graphite-cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ pkgs, lib, ... }:

let
version = "1.7.4";
graphite-cli = pkgs.stdenv.mkDerivation {
pname = "graphite-cli";
version = "1.7.4";

src = pkgs.fetchurl {
url = "https://registry.npmjs.org/@withgraphite/graphite-cli/-/graphite-cli-1.7.4.tgz";
hash = "sha256-srufROZk8DYzxDV0j6FhyD0afZ70rv7wUHS9TbGTopg=";
};

buildInputs = [ pkgs.nodejs ];

installPhase = ''
mkdir -p $out/lib/node_modules/@withgraphite/graphite-cli
cp -r . $out/lib/node_modules/@withgraphite/graphite-cli
chmod +x $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js
mkdir -p $out/bin
ln -s $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js $out/bin/gt
ln -s $out/lib/node_modules/@withgraphite/graphite-cli/graphite.js $out/bin/graphite
'';
};
in
{
id = "graphite-cli";
name = "Graphite CLI";
description = ''
Graphite CLI is a command-line tool that helps developers manage stacked pull requests
(also called stacked diffs), making it easier to break large changes into smaller,
reviewable pieces that can be submitted and merged incrementally.
'';
displayVersion = version;

replit.packages = [
graphite-cli
];

}