summary refs log tree commit diff
path: root/pkgs/development/tools/fac/default.nix
blob: 6a23f84f2366c9952a5b73fa2ff3a40d361867de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, git }:

buildGoPackage rec {
  pname = "fac";
  version = "2.0.0";

  goPackagePath = "github.com/mkchoi212/fac";

  src = fetchFromGitHub {
    owner = "mkchoi212";
    repo = "fac";
    rev = "v${version}";
    sha256 = "054bbiw0slz9szy3ap2sh5dy97w3g7ms27rd3ww3i1zdhvnggwpc";
  };

  goDeps = ./deps.nix;

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $out/bin/fac \
      --prefix PATH : ${git}/bin

    # Install man page, not installed by default
    install -D go/src/${goPackagePath}/assets/doc/fac.1 $out/share/man/man1/fac.1
  '';

  meta = with stdenv.lib; {
    description = "CUI for fixing git conflicts";
    inherit (src.meta) homepage;
    license = licenses.mit;
    maintainers = with maintainers; [ dtzWill ];
  };
}