nixpkgs/pkgs/applications/version-management/gitolite/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.6 KiB
Nix
Raw Normal View History

2022-08-28 01:24:37 +02:00
{ stdenv, coreutils, fetchFromGitHub, git, lib, makeWrapper, nettools, perl, perlPackages, nixosTests }:
stdenv.mkDerivation rec {
pname = "gitolite";
2020-08-14 01:50:47 +02:00
version = "3.6.12";
2018-01-27 21:14:09 +01:00
src = fetchFromGitHub {
owner = "sitaramc";
repo = "gitolite";
2018-10-17 00:20:38 +02:00
rev = "v${version}";
2020-08-14 01:50:47 +02:00
sha256 = "05xw1pmagvkrbzga5pgl3xk9qyc6b5x73f842454f3w9ijspa8zy";
};
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"
2015-05-07 23:26:06 +02:00
substituteInPlace src/lib/Gitolite/Setup.pm \
--replace hostname "${nettools}/bin/hostname"
2022-08-28 01:24:37 +02:00
substituteInPlace src/commands/sskm \
--replace /bin/rm "${coreutils}/bin/rm"
'';
postFixup = ''
wrapProgram $out/bin/gitolite-shell \
--prefix PATH : ${lib.makeBinPath [ git (perl.withPackages (p: [ p.JSON ])) ]}
'';
installPhase = ''
mkdir -p $out/bin
perl ./install -to $out/bin
2018-01-27 21:14:09 +01:00
echo ${version} > $out/bin/VERSION
'';
passthru.tests = {
gitolite = nixosTests.gitolite;
};
meta = with lib; {
description = "Finely-grained git repository hosting";
homepage = "https://gitolite.com/gitolite/index.html";
license = licenses.gpl2;
platforms = platforms.unix;
2018-01-27 21:14:09 +01:00
maintainers = [ maintainers.thoughtpolice maintainers.lassulus maintainers.tomberek ];
};
}