Merge pull request #50334 from c0bw3b/pkg/opengrok

opengrok: 0.12.1.5 -> 1.0
This commit is contained in:
Renaud 2018-11-17 19:37:55 +01:00 committed by GitHub
commit 41391e9cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,30 +1,22 @@
{ fetchurl, stdenv, jre, ctags, makeWrapper, coreutils, git }:
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git }:
stdenv.mkDerivation rec {
name = "opengrok-${version}";
version = "1.0";
# 1.0 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
src = fetchurl {
url = https://github.com/OpenGrok/OpenGrok/files/213268/opengrok-0.12.1.5.tar.gz;
sha256 = "1bafiq4s9sqldinl6fy931rm0x8zj2magfdlbi3nqlnidsghgkn3";
url = "https://github.com/oracle/opengrok/releases/download/${version}/${name}.tar.gz";
sha256 = "0h4rwfh8m41b7ij931gcbmkihri25m48373qf6ig0714s66xwc4i";
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
cp -a * $out/
substituteInPlace $out/bin/OpenGrok --replace /bin/uname ${coreutils}/bin/uname
substituteInPlace $out/bin/OpenGrok --replace "/bin/uname" "${coreutils}/bin/uname"
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!/bin/sh"
wrapProgram $out/bin/OpenGrok \
--prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \
--set JAVA_HOME "${jre}" \