2018-11-13 22:47:29 +00:00
|
|
|
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git }:
|
2014-06-04 13:28:08 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-02-14 10:18:03 +00:00
|
|
|
name = "opengrok-${version}";
|
2018-03-09 12:55:03 +00:00
|
|
|
version = "1.0";
|
2014-06-04 13:28:08 +01:00
|
|
|
|
2017-02-14 10:18:03 +00:00
|
|
|
# binary distribution
|
2014-06-04 13:28:08 +01:00
|
|
|
src = fetchurl {
|
2018-11-13 22:47:29 +00:00
|
|
|
url = "https://github.com/oracle/opengrok/releases/download/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "0h4rwfh8m41b7ij931gcbmkihri25m48373qf6ig0714s66xwc4i";
|
2014-06-04 13:28:08 +01:00
|
|
|
};
|
|
|
|
|
2018-11-13 22:47:29 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-06-04 13:28:08 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out
|
2014-06-04 13:28:08 +01:00
|
|
|
cp -a * $out/
|
2018-11-13 22:47:29 +00:00
|
|
|
substituteInPlace $out/bin/OpenGrok --replace "/bin/uname" "${coreutils}/bin/uname"
|
|
|
|
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!/bin/sh"
|
2014-06-04 13:28:08 +01:00
|
|
|
wrapProgram $out/bin/OpenGrok \
|
2016-08-22 23:06:51 +01:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \
|
2014-06-04 13:28:08 +01:00
|
|
|
--set JAVA_HOME "${jre}" \
|
|
|
|
--set OPENGROK_TOMCAT_BASE "/var/tomcat"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Source code search and cross reference engine";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = https://opengrok.github.io/OpenGrok/;
|
2014-06-04 13:28:08 +01:00
|
|
|
license = licenses.cddl;
|
|
|
|
maintainers = [ maintainers.lethalman ];
|
|
|
|
};
|
|
|
|
}
|