From 45923f698dec82f366e994935cd52b17c1a0d070 Mon Sep 17 00:00:00 2001 From: Renaud Date: Tue, 13 Nov 2018 23:47:29 +0100 Subject: [PATCH] opengrok: 0.12.1.5 -> 1.0 Fix source tarball and version claim mismatch --- .../tools/misc/opengrok/default.nix | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pkgs/development/tools/misc/opengrok/default.nix b/pkgs/development/tools/misc/opengrok/default.nix index a0434f2d0e72..c8fdf246bcf1 100644 --- a/pkgs/development/tools/misc/opengrok/default.nix +++ b/pkgs/development/tools/misc/opengrok/default.nix @@ -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}" \