2019-02-26 12:45:54 +01:00
|
|
|
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git, runtimeShell }:
|
2014-06-04 14:28:08 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "opengrok";
|
2018-03-09 13:55:03 +01:00
|
|
|
version = "1.0";
|
2014-06-04 14:28:08 +02:00
|
|
|
|
2017-02-14 11:18:03 +01:00
|
|
|
# binary distribution
|
2014-06-04 14:28:08 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://github.com/oracle/opengrok/releases/download/${version}/${pname}-${version}.tar.gz";
|
2018-11-13 23:47:29 +01:00
|
|
|
sha256 = "0h4rwfh8m41b7ij931gcbmkihri25m48373qf6ig0714s66xwc4i";
|
2014-06-04 14:28:08 +02:00
|
|
|
};
|
|
|
|
|
2018-11-13 23:47:29 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2014-06-04 14:28:08 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out
|
2014-06-04 14:28:08 +02:00
|
|
|
cp -a * $out/
|
2018-11-13 23:47:29 +01:00
|
|
|
substituteInPlace $out/bin/OpenGrok --replace "/bin/uname" "${coreutils}/bin/uname"
|
2019-02-26 12:45:54 +01:00
|
|
|
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!${runtimeShell}"
|
2014-06-04 14:28:08 +02:00
|
|
|
wrapProgram $out/bin/OpenGrok \
|
2016-08-23 00:06:51 +02:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \
|
2014-06-04 14:28:08 +02: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 20:42:46 +01:00
|
|
|
homepage = https://opengrok.github.io/OpenGrok/;
|
2014-06-04 14:28:08 +02:00
|
|
|
license = licenses.cddl;
|
|
|
|
maintainers = [ maintainers.lethalman ];
|
|
|
|
};
|
|
|
|
}
|