From faa3ffcd9f11578badaa6dd44dd7fe454d2fa23d Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 21 Apr 2022 14:38:59 -0400 Subject: Add forgit --- pkgs/forgit.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/forgit.nix (limited to 'pkgs') 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 ]; + }; +} -- cgit v1.2.3