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

49 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, git, lib, makeWrapper, nettools, perl }:
stdenv.mkDerivation rec {
pname = "gitolite";
version = "3.6.11";
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}";
sha256 = "1rkj7gknwjlc5ij9w39zf5mr647bm45la57yjczydmvrb8c56yrh";
};
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"
'';
postFixup = ''
wrapProgram $out/bin/gitolite-shell \
--prefix PATH : "${git}/bin"
'';
installPhase = ''
mkdir -p $out/bin
perl ./install -to $out/bin
2018-01-27 21:14:09 +01:00
echo ${version} > $out/bin/VERSION
'';
meta = with stdenv.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 ];
};
}