Commit 1f6987ce authored by Martino Fontana's avatar Martino Fontana Committed by Yt
Browse files
parent 46016871
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
{ lib, buildFishPlugin, fetchFromGitHub, git, fzf }:
{ lib, buildFishPlugin, fetchFromGitHub }:

buildFishPlugin rec {
  pname = "forgit";
  version = "unstable-2022-10-14";

  preFixup = ''
    substituteInPlace $out/share/fish/vendor_conf.d/forgit.plugin.fish \
      --replace "fzf " "${fzf}/bin/fzf " \
      --replace "git " "${git}/bin/git "
  '';
  version = "23.04.0";

  src = fetchFromGitHub {
    owner = "wfxr";
    repo = "forgit";
    rev = "2872548075e63bc83a0b960e2813b16571998563";
    sha256 = "sha256-NKL4c4k9Nath8NQ3sWUTGUzp517jRX4v0qVaKMJSMrw=";
    rev = version;
    sha256 = "sha256-3lvYIuzuJw0CQlaAQG6hAyfUgSXM+3BOmKRVDNFUN/U=";
  };

  postInstall = ''
    cp -r bin $out/share/fish/vendor_conf.d/
  '';

  meta = with lib; {
    description = "A utility tool powered by fzf for using git interactively.";
    homepage = "https://github.com/wfxr/forgit";