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