graylog: improve JRE handling
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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, makeWrapper, jre_headless, nixosTests }:
|
||||
{ lib, stdenv, fetchurl, makeWrapper, openjdk11_headless, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "graylog";
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
dontStrip = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
makeWrapperArgs = [ "--prefix" "PATH" ":" "${jre_headless}/bin" ];
|
||||
makeWrapperArgs = [ "--set-default" "JAVA_HOME" "${openjdk11_headless}" ];
|
||||
|
||||
passthru.tests = { inherit (nixosTests) graylog; };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user