···120120 if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
121121 touch "${cfg.spoolDir}/.firstRun"
122122 fi
123123+124124+ if ! test -e ${cfg.spoolDir}/.erlang.cookie; then
125125+ touch ${cfg.spoolDir}/.erlang.cookie
126126+ chmod 600 ${cfg.spoolDir}/.erlang.cookie
127127+ dd if=/dev/random bs=16 count=1 | base64 > ${cfg.spoolDir}/.erlang.cookie
128128+ fi
123129 '';
124130125131 postStart = ''
+11-3
nixos/modules/services/web-apps/keycloak.nix
···2525 maintainers
2626 catAttrs
2727 collect
2828- splitString
2928 hasPrefix
3029 ;
3130···329328 };
330329331330 hostname = mkOption {
332332- type = str;
331331+ type = nullOr str;
332332+ default = null;
333333 example = "keycloak.example.com";
334334 description = lib.mdDoc ''
335335 The hostname part of the public URL used as base for
···451451452452 keycloakConfig = lib.generators.toKeyValue {
453453 mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
454454- mkValueString = v: with builtins;
454454+ mkValueString = v:
455455 if isInt v then toString v
456456 else if isString v then v
457457 else if true == v then "true"
···479479 {
480480 assertion = createLocalPostgreSQL -> config.services.postgresql.settings.standard_conforming_strings or true;
481481 message = "Setting up a local PostgreSQL db for Keycloak requires `standard_conforming_strings` turned on to work reliably";
482482+ }
483483+ {
484484+ assertion = cfg.settings.hostname != null || cfg.settings.hostname-url or null != null;
485485+ message = "Setting the Keycloak hostname is required, see `services.keycloak.settings.hostname`";
486486+ }
487487+ {
488488+ assertion = !(cfg.settings.hostname != null && cfg.settings.hostname-url or null != null);
489489+ message = "`services.keycloak.settings.hostname` and `services.keycloak.settings.hostname-url` are mutually exclusive";
482490 }
483491 ];
484492
···3333 makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
3434 doCheck = true;
35353636+ # In procedure bytevector-u8-ref: Argument 2 out of range
3737+ dontStrip = stdenv.isDarwin;
3838+3639 meta = with lib; {
3740 description = "Bindings to Libgcrypt for GNU Guile";
3841 homepage = "https://notabug.org/cwebber/guile-gcrypt";
···11-{ fetchurl, lib, stdenv, coreutils, makeWrapper }:
22-33-stdenv.mkDerivation rec {
44- pname = "ant";
55- version = "1.9.16";
66-77- nativeBuildInputs = [ makeWrapper ];
88-99- src = fetchurl {
1010- url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
1111- sha256 = "0rif9kj6njajy951w3aapk27y1mbaxb08whs126v533h96rb1kjp";
1212- };
1313-1414- contrib = fetchurl {
1515- url = "mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2";
1616- sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
1717- };
1818-1919- installPhase =
2020- ''
2121- mkdir -p $out/bin $out/lib/ant
2222- mv * $out/lib/ant/
2323-2424- # Get rid of the manual (35 MiB). Maybe we should put this in a
2525- # separate output. Keep the antRun script since it's vanilla sh
2626- # and needed for the <exec/> task (but since we set ANT_HOME to
2727- # a weird value, we have to move antRun to a weird location).
2828- # Get rid of the other Ant scripts since we provide our own.
2929- mv $out/lib/ant/bin/antRun $out/bin/
3030- rm -rf $out/lib/ant/{manual,bin,WHATSNEW}
3131- mkdir $out/lib/ant/bin
3232- mv $out/bin/antRun $out/lib/ant/bin/
3333-3434- # Install ant-contrib.
3535- unpackFile $contrib
3636- cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/
3737-3838- cat >> $out/bin/ant <<EOF
3939- #! ${stdenv.shell} -e
4040-4141- ANT_HOME=$out/lib/ant
4242-4343- # Find the JDK by looking for javac. As a fall-back, find the
4444- # JRE by looking for java. The latter allows just the JRE to be
4545- # used with (say) ECJ as the compiler. Finally, allow the GNU
4646- # JVM.
4747- if [ -z "\''${JAVA_HOME-}" ]; then
4848- for i in javac java gij; do
4949- if p="\$(type -p \$i)"; then
5050- export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))"
5151- break
5252- fi
5353- done
5454- if [ -z "\''${JAVA_HOME-}" ]; then
5555- echo "\$0: cannot find the JDK or JRE" >&2
5656- exit 1
5757- fi
5858- fi
5959-6060- if [ -z \$NIX_JVM ]; then
6161- if [ -e \$JAVA_HOME/bin/java ]; then
6262- NIX_JVM=\$JAVA_HOME/bin/java
6363- elif [ -e \$JAVA_HOME/bin/gij ]; then
6464- NIX_JVM=\$JAVA_HOME/bin/gij
6565- else
6666- NIX_JVM=java
6767- fi
6868- fi
6969-7070- LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
7171-7272- exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \
7373- -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \
7474- org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \
7575- -cp "\$CLASSPATH" "\$@"
7676- EOF
7777-7878- chmod +x $out/bin/ant
7979- ''; # */
8080-8181- meta = {
8282- homepage = "https://ant.apache.org/";
8383- description = "A Java-based build tool";
8484-8585- longDescription = ''
8686- Apache Ant is a Java-based build tool. In theory, it is kind of like
8787- Make, but without Make's wrinkles.
8888-8989- Why another build tool when there is already make, gnumake, nmake, jam,
9090- and others? Because all those tools have limitations that Ant's
9191- original author couldn't live with when developing software across
9292- multiple platforms. Make-like tools are inherently shell-based -- they
9393- evaluate a set of dependencies, then execute commands not unlike what
9494- you would issue in a shell. This means that you can easily extend
9595- these tools by using or writing any program for the OS that you are
9696- working on. However, this also means that you limit yourself to the
9797- OS, or at least the OS type such as Unix, that you are working on.
9898-9999- Ant is different. Instead of a model where it is extended with
100100- shell-based commands, Ant is extended using Java classes. Instead of
101101- writing shell commands, the configuration files are XML-based, calling
102102- out a target tree where various tasks get executed. Each task is run
103103- by an object that implements a particular Task interface.
104104- '';
105105-106106- sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
107107- license = lib.licenses.asl20;
108108- maintainers = [ lib.maintainers.eelco ];
109109- platforms = lib.platforms.all;
110110- };
111111-}
···6969 alsaUtils = alsa-utils; # Added 2021-06-10
7070 angelfish = libsForQt5.kdeGear.angelfish; # Added 2021-10-06
7171 ansible_2_12 = throw "Ansible 2.12 goes end of life in 2023/05 and can't be supported throughout the 23.05 release cycle"; # Added 2023-05-16
7272+ apacheAnt_1_9 = throw "Ant 1.9 has been removed since it's not used in nixpkgs anymore"; # Added 2023-11-12
7273 antimicroX = antimicrox; # Added 2021-10-31
7374 arcanPackages = throw "arcanPackages was removed and its sub-attributes were promoted to top-level"; # Added 2023-11-26
7475 ardour_6 = throw "ardour_6 has been removed in favor of newer versions"; # Added 2023-10-13