2020-04-09 21:23:31 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ncurses, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45
|
2017-05-07 22:22:29 +01:00
|
|
|
, readline, makeWrapper, git, libiconv, autoreconfHook, findXMLCatalogs, pkgconfig
|
2014-05-25 12:28:06 +01:00
|
|
|
}:
|
2012-08-07 23:49:12 +01:00
|
|
|
|
2012-11-17 01:13:25 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-04-10 14:03:04 +01:00
|
|
|
pname = "tig";
|
2020-04-09 21:23:31 +01:00
|
|
|
version = "2.5.1";
|
2017-04-10 14:03:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonas";
|
|
|
|
repo = pname;
|
2019-08-15 13:41:18 +01:00
|
|
|
rev = "${pname}-${version}";
|
2020-04-09 21:23:31 +01:00
|
|
|
sha256 = "0wxcbfqsk8p84zizy6lf3gp5j122wrf8c7xlipki6nhcfhksn33b";
|
2012-08-07 23:49:12 +01:00
|
|
|
};
|
2013-11-09 18:06:55 +00:00
|
|
|
|
2017-05-07 22:22:29 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkgconfig ];
|
2017-04-10 14:03:04 +01:00
|
|
|
|
|
|
|
autoreconfFlags = "-I tools -v";
|
|
|
|
|
|
|
|
buildInputs = [ ncurses readline git ]
|
2015-11-07 12:50:25 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
|
2013-11-09 18:06:55 +00:00
|
|
|
|
2017-04-10 14:03:04 +01:00
|
|
|
# those files are inherently impure, we'll handle the corresponding dependencies.
|
|
|
|
postPatch = ''
|
|
|
|
rm -f contrib/config.make-*
|
2013-11-09 18:03:16 +00:00
|
|
|
'';
|
2013-11-09 18:06:55 +00:00
|
|
|
|
2015-01-13 21:51:04 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2012-08-07 23:49:12 +01:00
|
|
|
installPhase = ''
|
|
|
|
make install
|
|
|
|
make install-doc
|
2018-09-23 18:36:22 +01:00
|
|
|
|
2020-04-14 07:51:32 +01:00
|
|
|
# fixes tig-completion __git-complete dependency
|
|
|
|
sed -i '1s;^;source ${git}/share/bash-completion/completions/git\n;' contrib/tig-completion.bash
|
|
|
|
|
2018-09-23 18:36:22 +01:00
|
|
|
substituteInPlace contrib/tig-completion.zsh \
|
2020-04-14 07:51:32 +01:00
|
|
|
--replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/share/bash-completion/completions/tig"
|
2018-09-23 18:36:22 +01:00
|
|
|
|
2020-04-14 07:51:32 +01:00
|
|
|
install -D contrib/tig-completion.bash $out/share/bash-completion/completions/tig
|
2018-07-12 12:26:56 +01:00
|
|
|
install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig
|
2018-07-11 08:08:52 +01:00
|
|
|
cp contrib/vim.tigrc $out/etc/
|
2015-01-13 21:51:04 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/tig \
|
|
|
|
--prefix PATH ':' "${git}/bin"
|
2012-08-07 23:49:12 +01:00
|
|
|
'';
|
2013-11-09 18:06:55 +00:00
|
|
|
|
2013-05-20 18:33:18 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://jonas.github.io/tig/";
|
2013-11-09 18:06:55 +00:00
|
|
|
description = "Text-mode interface for git";
|
2019-08-20 18:36:05 +01:00
|
|
|
maintainers = with maintainers; [ bjornfor domenkozar qknight globin ];
|
2013-05-20 18:33:18 +01:00
|
|
|
license = licenses.gpl2;
|
2014-04-12 17:37:45 +01:00
|
|
|
platforms = platforms.unix;
|
2012-08-07 23:49:12 +01:00
|
|
|
};
|
|
|
|
}
|