mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
22de3c19e7
Since the upstream graylogctl script will prefer finding its java executable based on JAVA_HOME, we now set this instead of PATH in order to allow it to find the JRE. By setting it conditionally on it not already being set, we allow selecting a different JRE at runtime. We also explicitly use openjdk11, which supports the UseConcMarkSweepGC option which graylog insists on using.
34 lines
914 B
Nix
34 lines
914 B
Nix
{ lib, stdenv, fetchurl, makeWrapper, openjdk11_headless, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "graylog";
|
|
version = "3.3.9";
|
|
|
|
src = fetchurl {
|
|
url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz";
|
|
sha256 = "1wl9j2jgjg5gwcsh92qr5f68wx12nvwadc9xkaa9wwd7x3z825jq";
|
|
};
|
|
|
|
dontBuild = true;
|
|
dontStrip = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
makeWrapperArgs = [ "--set-default" "JAVA_HOME" "${openjdk11_headless}" ];
|
|
|
|
passthru.tests = { inherit (nixosTests) graylog; };
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
cp -r {graylog.jar,lib,bin,plugin} $out
|
|
wrapProgram $out/bin/graylogctl $makeWrapperArgs
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source log management solution";
|
|
homepage = "https://www.graylog.org/";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.fadenb ];
|
|
};
|
|
}
|