diff options
author | Ben Sima <ben@bsima.me> | 2022-04-21 14:38:59 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2022-04-21 14:39:22 -0400 |
commit | faa3ffcd9f11578badaa6dd44dd7fe454d2fa23d (patch) | |
tree | 7fd08ccefe7f296898d0db6a007357af2931e0cf /pkgs | |
parent | 240b9ced293902425b7061a2310d55909993d300 (diff) |
Add forgit
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/forgit.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/forgit.nix b/pkgs/forgit.nix new file mode 100644 index 0000000..07cad43 --- /dev/null +++ b/pkgs/forgit.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchFromGitHub, bash, fzf, git }: + +stdenv.mkDerivation rec { + pname = "forgit"; + version = "unstable-2022-4-20"; + + src = fetchFromGitHub { + owner = "wfxr"; + repo = "forgit"; + rev = "fa9fd624398643d53ea9cea61d66eca77ca7c46c"; + sha256 = "sha256:1hq1qbpfj0kfld8rvqf7mhh83mll6baq26p1cp0sr68cf66nl51q"; + }; + + buildInputs = [ bash fzf ]; + dontBuild = true; + + installPhase = '' + runHook preInstall + + substituteInPlace forgit.plugin.zsh \ + --replace \$FORGIT_INSTALL_DIR $out/share/bash + + install -Dt "$out/bin/" -m744 bin/git-forgit + install -Dt "$out/share/bash/" -m444 forgit.plugin.zsh + + runHook postInstall + ''; + + meta = with lib; { + description = "A utility tool powered by fzf for using git interactively"; + homepage = "https://github.com/wfxr/forgit"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ bsima ]; + }; +} |