2014-06-04 13:28:08 +01:00
|
|
|
{ fetchurl, stdenv, jre, ctags, makeWrapper, coreutils, git }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-02-14 10:18:03 +00:00
|
|
|
name = "opengrok-${version}";
|
|
|
|
version = "0.12.5";
|
2014-06-04 13:28:08 +01:00
|
|
|
|
2017-02-14 10:18:03 +00:00
|
|
|
# 0.12.5 is the latest distributed as a .tar.gz file.
|
|
|
|
# Newer are distribued as .zip so a source build is required.
|
|
|
|
|
|
|
|
# if builded from source
|
|
|
|
#src = fetchurl {
|
|
|
|
# url = "https://github.com/OpenGrok/OpenGrok/archive/${version}.tar.gz";
|
|
|
|
# sha256 = "01r7ipnj915rnyxyqrnmjfagkip23q5lx9g787qb7qrnbvgfi118";
|
|
|
|
#};
|
|
|
|
|
|
|
|
# binary distribution
|
2014-06-04 13:28:08 +01:00
|
|
|
src = fetchurl {
|
2017-02-14 10:18:03 +00:00
|
|
|
url = https://github.com/OpenGrok/OpenGrok/files/213268/opengrok-0.12.1.5.tar.gz;
|
|
|
|
sha256 = "c3ce079f6ed1526c475cb4b9a7aa901f75507318c93b436d6c14eba4098e4ead";
|
2014-06-04 13:28:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out
|
2014-06-04 13:28:08 +01:00
|
|
|
cp -a * $out/
|
|
|
|
substituteInPlace $out/bin/OpenGrok --replace /bin/uname ${coreutils}/bin/uname
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|