2019-02-26 11:45:54 +00:00
|
|
|
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git, runtimeShell }:
|
2014-06-04 13:28:08 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "opengrok";
|
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 {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://github.com/oracle/opengrok/releases/download/${version}/${pname}-${version}.tar.gz";
|
2018-11-13 22:47:29 +00:00
|
|
|
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"
|
2019-02-26 11:45:54 +00:00
|
|
|
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!${runtimeShell}"
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://opengrok.github.io/OpenGrok/";
|
2014-06-04 13:28:08 +01:00
|
|
|
license = licenses.cddl;
|
|
|
|
maintainers = [ maintainers.lethalman ];
|
|
|
|
};
|
|
|
|
}
|