nixpkgs-suyu/pkgs/development/tools/fac/default.nix

39 lines
1,006 B
Nix
Raw Normal View History

2018-01-27 01:20:29 +01:00
{ stdenv, buildGoPackage, fetchFromGitHub, fetchurl, makeWrapper, git }:
2018-01-02 17:25:45 +01:00
2018-01-27 01:20:29 +01:00
let
# TODO: Remove this on next update, should be included
fac_1 = fetchurl {
url = https://raw.githubusercontent.com/mkchoi212/fac/0a500c2a2dba9017fe7c2a45f15c328755f561a6/doc/fac.1;
sha256 = "1fsyx9i20ryhpihdpvs2z7vccl13b9bnh5hcdxn7bvqjz78mbqhw";
};
in buildGoPackage rec {
2018-01-02 17:25:45 +01:00
name = "fac-${version}";
2018-01-27 01:20:29 +01:00
version = "1.0.4";
2018-01-02 17:25:45 +01:00
goPackagePath = "github.com/mkchoi212/fac";
src = fetchFromGitHub {
owner = "mkchoi212";
repo = "fac";
rev = "v${version}";
2018-01-27 01:20:29 +01:00
sha256 = "0jhx80jbkxfxj95hmdpb9wwwya064xpfkaa218l1lwm3qwfbpk95";
2018-01-02 17:25:45 +01:00
};
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $bin/bin/fac \
--prefix PATH : ${git}/bin
2018-01-27 01:20:29 +01:00
install -D ${fac_1} $out/share/man/man1/fac.1
2018-01-02 17:25:45 +01:00
'';
meta = with stdenv.lib; {
description = "CUI for fixing git conflicts";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ dtzWill ];
};
}