···120 if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
121 touch "${cfg.spoolDir}/.firstRun"
122 fi
000000123 '';
124125 postStart = ''
···120 if [ -z "$(ls -A '${cfg.spoolDir}')" ]; then
121 touch "${cfg.spoolDir}/.firstRun"
122 fi
123+124+ if ! test -e ${cfg.spoolDir}/.erlang.cookie; then
125+ touch ${cfg.spoolDir}/.erlang.cookie
126+ chmod 600 ${cfg.spoolDir}/.erlang.cookie
127+ dd if=/dev/random bs=16 count=1 | base64 > ${cfg.spoolDir}/.erlang.cookie
128+ fi
129 '';
130131 postStart = ''
+11-3
nixos/modules/services/web-apps/keycloak.nix
···25 maintainers
26 catAttrs
27 collect
28- splitString
29 hasPrefix
30 ;
31···329 };
330331 hostname = mkOption {
332- type = str;
0333 example = "keycloak.example.com";
334 description = lib.mdDoc ''
335 The hostname part of the public URL used as base for
···451452 keycloakConfig = lib.generators.toKeyValue {
453 mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
454- mkValueString = v: with builtins;
455 if isInt v then toString v
456 else if isString v then v
457 else if true == v then "true"
···479 {
480 assertion = createLocalPostgreSQL -> config.services.postgresql.settings.standard_conforming_strings or true;
481 message = "Setting up a local PostgreSQL db for Keycloak requires `standard_conforming_strings` turned on to work reliably";
00000000482 }
483 ];
484
···25 maintainers
26 catAttrs
27 collect
028 hasPrefix
29 ;
30···328 };
329330 hostname = mkOption {
331+ type = nullOr str;
332+ default = null;
333 example = "keycloak.example.com";
334 description = lib.mdDoc ''
335 The hostname part of the public URL used as base for
···451452 keycloakConfig = lib.generators.toKeyValue {
453 mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
454+ mkValueString = v:
455 if isInt v then toString v
456 else if isString v then v
457 else if true == v then "true"
···479 {
480 assertion = createLocalPostgreSQL -> config.services.postgresql.settings.standard_conforming_strings or true;
481 message = "Setting up a local PostgreSQL db for Keycloak requires `standard_conforming_strings` turned on to work reliably";
482+ }
483+ {
484+ assertion = cfg.settings.hostname != null || cfg.settings.hostname-url or null != null;
485+ message = "Setting the Keycloak hostname is required, see `services.keycloak.settings.hostname`";
486+ }
487+ {
488+ assertion = !(cfg.settings.hostname != null && cfg.settings.hostname-url or null != null);
489+ message = "`services.keycloak.settings.hostname` and `services.keycloak.settings.hostname-url` are mutually exclusive";
490 }
491 ];
492
···33 makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
34 doCheck = true;
3500036 meta = with lib; {
37 description = "Bindings to Libgcrypt for GNU Guile";
38 homepage = "https://notabug.org/cwebber/guile-gcrypt";
···33 makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
34 doCheck = true;
3536+ # In procedure bytevector-u8-ref: Argument 2 out of range
37+ dontStrip = stdenv.isDarwin;
38+39 meta = with lib; {
40 description = "Bindings to Libgcrypt for GNU Guile";
41 homepage = "https://notabug.org/cwebber/guile-gcrypt";
···61 "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
62 ];
63000064 postInstall = lib.optionalString stdenv.isDarwin ''
65 # No rules to install the mac app, so do it manually.
66 mkdir -p $out/Applications
···61 "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
62 ];
6364+ env = lib.optionalAttrs stdenv.cc.isClang {
65+ NIX_CFLAGS_COMPILE = "-Wno-error=enum-constexpr-conversion";
66+ };
67+68 postInstall = lib.optionalString stdenv.isDarwin ''
69 # No rules to install the mac app, so do it manually.
70 mkdir -p $out/Applications
···1-{ fetchurl, lib, stdenv, coreutils, makeWrapper }:
2-3-stdenv.mkDerivation rec {
4- pname = "ant";
5- version = "1.9.16";
6-7- nativeBuildInputs = [ makeWrapper ];
8-9- src = fetchurl {
10- url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
11- sha256 = "0rif9kj6njajy951w3aapk27y1mbaxb08whs126v533h96rb1kjp";
12- };
13-14- contrib = fetchurl {
15- url = "mirror://sourceforge/ant-contrib/ant-contrib-1.0b3-bin.tar.bz2";
16- sha256 = "96effcca2581c1ab42a4828c770b48d54852edf9e71cefc9ed2ffd6590571ad1";
17- };
18-19- installPhase =
20- ''
21- mkdir -p $out/bin $out/lib/ant
22- mv * $out/lib/ant/
23-24- # Get rid of the manual (35 MiB). Maybe we should put this in a
25- # separate output. Keep the antRun script since it's vanilla sh
26- # and needed for the <exec/> task (but since we set ANT_HOME to
27- # a weird value, we have to move antRun to a weird location).
28- # Get rid of the other Ant scripts since we provide our own.
29- mv $out/lib/ant/bin/antRun $out/bin/
30- rm -rf $out/lib/ant/{manual,bin,WHATSNEW}
31- mkdir $out/lib/ant/bin
32- mv $out/bin/antRun $out/lib/ant/bin/
33-34- # Install ant-contrib.
35- unpackFile $contrib
36- cp -p ant-contrib/ant-contrib-*.jar $out/lib/ant/lib/
37-38- cat >> $out/bin/ant <<EOF
39- #! ${stdenv.shell} -e
40-41- ANT_HOME=$out/lib/ant
42-43- # Find the JDK by looking for javac. As a fall-back, find the
44- # JRE by looking for java. The latter allows just the JRE to be
45- # used with (say) ECJ as the compiler. Finally, allow the GNU
46- # JVM.
47- if [ -z "\''${JAVA_HOME-}" ]; then
48- for i in javac java gij; do
49- if p="\$(type -p \$i)"; then
50- export JAVA_HOME="\$(${coreutils}/bin/dirname \$(${coreutils}/bin/dirname \$(${coreutils}/bin/readlink -f \$p)))"
51- break
52- fi
53- done
54- if [ -z "\''${JAVA_HOME-}" ]; then
55- echo "\$0: cannot find the JDK or JRE" >&2
56- exit 1
57- fi
58- fi
59-60- if [ -z \$NIX_JVM ]; then
61- if [ -e \$JAVA_HOME/bin/java ]; then
62- NIX_JVM=\$JAVA_HOME/bin/java
63- elif [ -e \$JAVA_HOME/bin/gij ]; then
64- NIX_JVM=\$JAVA_HOME/bin/gij
65- else
66- NIX_JVM=java
67- fi
68- fi
69-70- LOCALCLASSPATH="\$ANT_HOME/lib/ant-launcher.jar\''${LOCALCLASSPATH:+:}\$LOCALCLASSPATH"
71-72- exec \$NIX_JVM \$NIX_ANT_OPTS \$ANT_OPTS -classpath "\$LOCALCLASSPATH" \
73- -Dant.home=\$ANT_HOME -Dant.library.dir="\$ANT_LIB" \
74- org.apache.tools.ant.launch.Launcher \$NIX_ANT_ARGS \$ANT_ARGS \
75- -cp "\$CLASSPATH" "\$@"
76- EOF
77-78- chmod +x $out/bin/ant
79- ''; # */
80-81- meta = {
82- homepage = "https://ant.apache.org/";
83- description = "A Java-based build tool";
84-85- longDescription = ''
86- Apache Ant is a Java-based build tool. In theory, it is kind of like
87- Make, but without Make's wrinkles.
88-89- Why another build tool when there is already make, gnumake, nmake, jam,
90- and others? Because all those tools have limitations that Ant's
91- original author couldn't live with when developing software across
92- multiple platforms. Make-like tools are inherently shell-based -- they
93- evaluate a set of dependencies, then execute commands not unlike what
94- you would issue in a shell. This means that you can easily extend
95- these tools by using or writing any program for the OS that you are
96- working on. However, this also means that you limit yourself to the
97- OS, or at least the OS type such as Unix, that you are working on.
98-99- Ant is different. Instead of a model where it is extended with
100- shell-based commands, Ant is extended using Java classes. Instead of
101- writing shell commands, the configuration files are XML-based, calling
102- out a target tree where various tasks get executed. Each task is run
103- by an object that implements a particular Task interface.
104- '';
105-106- sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
107- license = lib.licenses.asl20;
108- maintainers = [ lib.maintainers.eelco ];
109- platforms = lib.platforms.all;
110- };
111-}
···69 alsaUtils = alsa-utils; # Added 2021-06-10
70 angelfish = libsForQt5.kdeGear.angelfish; # Added 2021-10-06
71 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
072 antimicroX = antimicrox; # Added 2021-10-31
73 arcanPackages = throw "arcanPackages was removed and its sub-attributes were promoted to top-level"; # Added 2023-11-26
74 ardour_6 = throw "ardour_6 has been removed in favor of newer versions"; # Added 2023-10-13
···69 alsaUtils = alsa-utils; # Added 2021-06-10
70 angelfish = libsForQt5.kdeGear.angelfish; # Added 2021-10-06
71 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
72+ apacheAnt_1_9 = throw "Ant 1.9 has been removed since it's not used in nixpkgs anymore"; # Added 2023-11-12
73 antimicroX = antimicrox; # Added 2021-10-31
74 arcanPackages = throw "arcanPackages was removed and its sub-attributes were promoted to top-level"; # Added 2023-11-26
75 ardour_6 = throw "ardour_6 has been removed in favor of newer versions"; # Added 2023-10-13