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