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