summary refs log tree commit diff
path: root/pkgs/development/tools/misc/opengrok/default.nix
blob: d38c862ecfb1e14aaef5e5601b0d3b994e61ecae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ fetchurl, stdenv, jre, ctags, makeWrapper, coreutils, git }:

stdenv.mkDerivation rec {
  name = "opengrok-0.12.1";

  src = fetchurl {
    url = "http://java.net/projects/opengrok/downloads/download/${name}.tar.gz";
    sha256 = "0ihaqgf1z2gsjmy2q96m0s07dpnh92j3ss3myiqjdsh9957fwg79";
  };

  buildInputs = [ makeWrapper ];

  installPhase = ''
    mkdir -p $out
    cp -a * $out/
    substituteInPlace $out/bin/OpenGrok --replace /bin/uname ${coreutils}/bin/uname
    wrapProgram $out/bin/OpenGrok \
      --prefix PATH : "${ctags}/bin:${git}/bin" \
      --set JAVA_HOME "${jre}" \
      --set OPENGROK_TOMCAT_BASE "/var/tomcat"
  '';

  meta = with stdenv.lib; {
    description = "Source code search and cross reference engine";
    homepage = http://opengrok.github.io/OpenGrok/;
    license = licenses.cddl;
    maintainers = [ maintainers.lethalman ];
  };
}