2019-12-04 15:10:57 -08:00
|
|
|
{ stdenv, fetchFromGitHub, git, lib, makeWrapper, nettools, perl }:
|
2014-06-25 19:50:16 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "gitolite";
|
2019-01-16 04:28:26 -08:00
|
|
|
version = "3.6.11";
|
2014-06-25 19:50:16 -07:00
|
|
|
|
2018-01-27 12:14:09 -08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sitaramc";
|
|
|
|
repo = "gitolite";
|
2018-10-16 15:20:38 -07:00
|
|
|
rev = "v${version}";
|
2019-01-16 04:28:26 -08:00
|
|
|
sha256 = "1rkj7gknwjlc5ij9w39zf5mr647bm45la57yjczydmvrb8c56yrh";
|
2014-06-25 19:50:16 -07:00
|
|
|
};
|
|
|
|
|
2019-12-04 15:10:57 -08:00
|
|
|
buildInputs = [ nettools perl ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
propagatedBuildInputs = [ git ];
|
2016-05-04 03:08:35 -07:00
|
|
|
|
|
|
|
dontBuild = true;
|
2014-06-25 22:23:59 -07:00
|
|
|
|
2019-01-16 03:45:45 -08:00
|
|
|
postPatch = ''
|
2014-06-25 22:23:59 -07:00
|
|
|
substituteInPlace ./install --replace " 2>/dev/null" ""
|
|
|
|
substituteInPlace src/lib/Gitolite/Hooks/PostUpdate.pm \
|
2014-07-13 03:39:02 -07:00
|
|
|
--replace /usr/bin/perl "${perl}/bin/perl"
|
2014-06-25 22:23:59 -07:00
|
|
|
substituteInPlace src/lib/Gitolite/Hooks/Update.pm \
|
2014-07-13 03:39:02 -07:00
|
|
|
--replace /usr/bin/perl "${perl}/bin/perl"
|
2015-05-07 14:26:06 -07:00
|
|
|
substituteInPlace src/lib/Gitolite/Setup.pm \
|
|
|
|
--replace hostname "${nettools}/bin/hostname"
|
2014-06-25 22:23:59 -07:00
|
|
|
'';
|
2014-07-13 03:39:02 -07:00
|
|
|
|
2019-12-04 15:10:57 -08:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/gitolite-shell \
|
|
|
|
--prefix PATH : "${git}/bin"
|
|
|
|
'';
|
|
|
|
|
2014-06-25 19:50:16 -07:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
perl ./install -to $out/bin
|
2018-01-27 12:14:09 -08:00
|
|
|
echo ${version} > $out/bin/VERSION
|
2014-06-25 19:50:16 -07:00
|
|
|
'';
|
|
|
|
|
2014-07-13 03:39:02 -07:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-25 19:50:16 -07:00
|
|
|
description = "Finely-grained git repository hosting";
|
2019-07-10 12:52:51 -07:00
|
|
|
homepage = https://gitolite.com/gitolite/index.html;
|
2014-07-13 03:39:02 -07:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
2018-01-27 12:14:09 -08:00
|
|
|
maintainers = [ maintainers.thoughtpolice maintainers.lassulus maintainers.tomberek ];
|
2014-06-25 19:50:16 -07:00
|
|
|
};
|
2014-06-25 20:55:43 -07:00
|
|
|
}
|