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

38 lines
1.1 KiB
Nix
Raw Normal View History

2015-05-07 21:26:06 +00:00
{ stdenv, fetchurl, git, nettools, perl }:
stdenv.mkDerivation rec {
name = "gitolite-${version}";
2015-05-07 21:26:06 +00:00
version = "3.6.3";
src = fetchurl {
url = "https://github.com/sitaramc/gitolite/archive/v${version}.tar.gz";
2015-05-07 21:26:06 +00:00
sha256 = "16cxifjxnri719qb6zzwkdf61x5y957acbdhcgqcan23x1mfn84v";
};
2015-05-07 21:26:06 +00:00
buildInputs = [ git nettools perl ];
buildPhase = "true";
patchPhase = ''
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 21:26:06 +00:00
substituteInPlace src/lib/Gitolite/Setup.pm \
--replace hostname "${nettools}/bin/hostname"
'';
installPhase = ''
mkdir -p $out/bin
perl ./install -to $out/bin
'';
meta = with stdenv.lib; {
description = "Finely-grained git repository hosting";
homepage = http://gitolite.com/gitolite/index.html;
license = licenses.gpl2;
platforms = platforms.unix;
2015-05-07 21:26:06 +00:00
maintainers = [ maintainers.thoughtpolice maintainers.lassulus ];
};
}