keycloak: 19.0.2 -> 20.0.0

talyz ed88ec18 238d1dbf

+25 -5
+15
pkgs/servers/keycloak/config_vars.patch
···
··· 1 + diff --git a/quarkus/dist/src/main/content/bin/kc.sh b/quarkus/dist/src/main/content/bin/kc.sh 2 + index d7be862cde..16f9aa78e0 100644 3 + --- a/bin/kc.sh 4 + +++ b/bin/kc.sh 5 + @@ -32,8 +32,8 @@ abs_path () { 6 + fi 7 + } 8 + 9 + -SERVER_OPTS="-Dkc.home.dir='$(abs_path '..')'" 10 + -SERVER_OPTS="$SERVER_OPTS -Djboss.server.config.dir='$(abs_path '../conf')'" 11 + +SERVER_OPTS="-Dkc.home.dir=$KC_HOME_DIR" 12 + +SERVER_OPTS="$SERVER_OPTS -Djboss.server.config.dir=$KC_CONF_DIR" 13 + SERVER_OPTS="$SERVER_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager" 14 + SERVER_OPTS="$SERVER_OPTS -Dquarkus-log-max-startup-records=10000" 15 + CLASSPATH_OPTS="'$(abs_path "../lib/quarkus-run.jar"):$(abs_path "../lib/bootstrap/*")'"
+10 -5
pkgs/servers/keycloak/default.nix
··· 13 14 stdenv.mkDerivation rec { 15 pname = "keycloak"; 16 - version = "19.0.2"; 17 18 src = fetchzip { 19 url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip"; 20 - sha256 = "sha256-Ze9VE2gtLxoZpyqbeisvHdOu8yFPwAKnDMpfA3FXWy8="; 21 }; 22 23 nativeBuildInputs = [ makeWrapper jre ]; 24 25 buildPhase = '' 26 runHook preBuild 27 '' + lib.optionalString (confFile != null) '' ··· 37 ${lib.concatMapStringsSep "\n" (pl: "install_plugin ${lib.escapeShellArg pl}") plugins} 38 '' + '' 39 patchShebangs bin/kc.sh 40 bin/kc.sh build 41 42 runHook postBuild ··· 54 ''; 55 56 postFixup = '' 57 - substituteInPlace $out/bin/kc.sh --replace ${lib.escapeShellArg "-Dkc.home.dir='$DIRNAME'/../"} '-Dkc.home.dir=$KC_HOME_DIR' 58 - substituteInPlace $out/bin/kc.sh --replace ${lib.escapeShellArg "-Djboss.server.config.dir='$DIRNAME'/../conf"} '-Djboss.server.config.dir=$KC_CONF_DIR' 59 - 60 for script in $(find $out/bin -type f -executable); do 61 wrapProgram "$script" --set JAVA_HOME ${jre} --prefix PATH : ${jre}/bin 62 done
··· 13 14 stdenv.mkDerivation rec { 15 pname = "keycloak"; 16 + version = "20.0.0"; 17 18 src = fetchzip { 19 url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip"; 20 + sha256 = "sha256-dJueuXKv3GoDnaQnvYMzIJJSr+NNSYgS7KY3MTGE37Y="; 21 }; 22 23 nativeBuildInputs = [ makeWrapper jre ]; 24 25 + patches = [ 26 + # Make home.dir and config.dir configurable through the 27 + # KC_HOME_DIR and KC_CONF_DIR environment variables. 28 + ./config_vars.patch 29 + ]; 30 + 31 buildPhase = '' 32 runHook preBuild 33 '' + lib.optionalString (confFile != null) '' ··· 43 ${lib.concatMapStringsSep "\n" (pl: "install_plugin ${lib.escapeShellArg pl}") plugins} 44 '' + '' 45 patchShebangs bin/kc.sh 46 + export KC_HOME_DIR=$(pwd) 47 + export KC_CONF_DIR=$(pwd)/conf 48 bin/kc.sh build 49 50 runHook postBuild ··· 62 ''; 63 64 postFixup = '' 65 for script in $(find $out/bin -type f -executable); do 66 wrapProgram "$script" --set JAVA_HOME ${jre} --prefix PATH : ${jre}/bin 67 done