biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / version-management / gitolite / default.nix
blob6e7a627f9cba664a697b88feb6ade34b677e971d
1 { stdenv, coreutils, fetchFromGitHub, git, lib, makeWrapper, nettools, perl, perlPackages, nixosTests }:
3 stdenv.mkDerivation rec {
4   pname = "gitolite";
5   version = "3.6.13";
7   src = fetchFromGitHub {
8     owner = "sitaramc";
9     repo = "gitolite";
10     rev = "v${version}";
11     hash = "sha256-/VBu+aepIrxWc2padPa/WoXbIdKfIwqmA/M8d1GE5FI=";
12   };
14   buildInputs = [ nettools perl ];
15   nativeBuildInputs = [ makeWrapper ];
16   propagatedBuildInputs = [ git ];
18   dontBuild = true;
20   postPatch = ''
21     substituteInPlace ./install --replace " 2>/dev/null" ""
22     substituteInPlace src/lib/Gitolite/Hooks/PostUpdate.pm \
23       --replace /usr/bin/perl "${perl}/bin/perl"
24     substituteInPlace src/lib/Gitolite/Hooks/Update.pm \
25       --replace /usr/bin/perl "${perl}/bin/perl"
26     substituteInPlace src/lib/Gitolite/Setup.pm \
27       --replace hostname "${nettools}/bin/hostname"
28     substituteInPlace src/commands/sskm \
29       --replace /bin/rm "${coreutils}/bin/rm"
30   '';
32   postFixup = ''
33     wrapProgram $out/bin/gitolite-shell \
34       --prefix PATH : ${lib.makeBinPath [ git (perl.withPackages (p: [ p.JSON ])) ]}
35   '';
37   installPhase = ''
38     mkdir -p $out/bin
39     perl ./install -to $out/bin
40     echo ${version} > $out/bin/VERSION
41   '';
43   passthru.tests = {
44     gitolite = nixosTests.gitolite;
45   };
47   meta = with lib; {
48     description = "Finely-grained git repository hosting";
49     homepage    = "https://gitolite.com/gitolite/index.html";
50     license     = licenses.gpl2;
51     platforms   = platforms.unix;
52     maintainers = [ maintainers.thoughtpolice maintainers.lassulus maintainers.tomberek ];
53   };