Merge pull request #189101 from talyz/keycloak-19

keycloak: 18.0.0 -> 19.0.1
This commit is contained in:
superherointj 2022-08-31 12:57:49 -03:00 committed by GitHub
commit 73305cc3d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

View File

@ -25,6 +25,7 @@ let
catAttrs
collect
splitString
hasPrefix
;
inherit (builtins)
@ -312,8 +313,9 @@ in
http-relative-path = mkOption {
type = str;
default = "";
default = "/";
example = "/auth";
apply = x: if !(hasPrefix "/") x then "/" + x else x;
description = ''
The path relative to <literal>/</literal> for serving
resources.
@ -658,7 +660,7 @@ in
'' + ''
export KEYCLOAK_ADMIN=admin
export KEYCLOAK_ADMIN_PASSWORD=${cfg.initialAdminPassword}
kc.sh start
kc.sh start --optimized
'';
};

View File

@ -13,11 +13,11 @@
stdenv.mkDerivation rec {
pname = "keycloak";
version = "18.0.0";
version = "19.0.1";
src = fetchzip {
url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip";
sha256 = "0fxf9m50hpjplj077z2zjp0qibixz5y4lbc8159cnxbd4gzpkaaf";
sha256 = "sha256-3hqnFH0zWvgOgpQHV4eMqTGzUWEoRwxvOcOUL2s8YQk=";
};
nativeBuildInputs = [ makeWrapper jre ];
@ -28,17 +28,14 @@ stdenv.mkDerivation rec {
install -m 0600 ${confFile} conf/keycloak.conf
'' + ''
install_plugin() {
if [ -d "$1" ]; then
find "$1" -type f \( -iname \*.ear -o -iname \*.jar \) -exec install -m 0500 "{}" "providers/" \;
else
install -m 0500 "$1" "providers/"
fi
if [ -d "$1" ]; then
find "$1" -type f \( -iname \*.ear -o -iname \*.jar \) -exec install -m 0500 "{}" "providers/" \;
else
install -m 0500 "$1" "providers/"
fi
}
${lib.concatMapStringsSep "\n" (pl: "install_plugin ${lib.escapeShellArg pl}") plugins}
'' + ''
export KC_HOME_DIR=$out
export KC_CONF_DIR=$out/conf
patchShebangs bin/kc.sh
bin/kc.sh build