diff --git a/pkgs/modules/default.nix b/pkgs/modules/default.nix index 59300e6c..45bfb25e 100644 --- a/pkgs/modules/default.nix +++ b/pkgs/modules/default.nix @@ -158,6 +158,7 @@ let nodepkgs = pkgs.nodePackages; }) (import ./replit-rtld-loader) + (import ./graphite-cli) ]; activeModules = listToAttrs ( diff --git a/pkgs/modules/graphite-cli/default.nix b/pkgs/modules/graphite-cli/default.nix new file mode 100644 index 00000000..7e95ad3d --- /dev/null +++ b/pkgs/modules/graphite-cli/default.nix @@ -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 + ]; + +}