nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, jre, makeWrapper }:
2
3stdenv.mkDerivation rec {
4 pname = "opengrok";
5 version = "1.12.9";
6
7 # binary distribution
8 src = fetchurl {
9 url = "https://github.com/oracle/opengrok/releases/download/${version}/${pname}-${version}.tar.gz";
10 hash = "sha256-8VyCMFFL85qqnkO66qobB0OzF8DWfpjkc8Jxbp8FtH0=";
11 };
12
13 nativeBuildInputs = [ makeWrapper ];
14
15 installPhase = ''
16 runHook preInstall
17
18 mkdir -p $out
19 cp -a * $out/
20 makeWrapper ${jre}/bin/java $out/bin/opengrok \
21 --add-flags "-jar $out/lib/opengrok.jar"
22
23 runHook postInstall
24 '';
25
26 meta = with lib; {
27 description = "Source code search and cross reference engine";
28 homepage = "https://opengrok.github.io/OpenGrok/";
29 changelog = "https://github.com/oracle/opengrok/releases/tag/${version}";
30 license = licenses.cddl;
31 maintainers = [ ];
32 platforms = platforms.all;
33 };
34}