···328328 </listitem>
329329 <listitem>
330330 <para>
331331+ The <literal>dokuwiki</literal> service now takes
332332+ configuration via the
333333+ <literal>services.dokuwiki.sites.<name>.settings</literal>
334334+ attribute set, <literal>extraConfig</literal> is deprecated
335335+ and will be removed. The
336336+ <literal>{aclUse,superUser,disableActions}</literal>
337337+ attributes have been renamed, <literal>pluginsConfig</literal>
338338+ now also accepts an attribute set of booleans, passing plain
339339+ PHP is deprecated. Same applies to <literal>acl</literal>
340340+ which now also accepts structured settings.
341341+ </para>
342342+ </listitem>
343343+ <listitem>
344344+ <para>
331345 To reduce closure size in
332346 <literal>nixos/modules/profiles/minimal.nix</literal> profile
333347 disabled installation documentations and manuals. Also
+4
nixos/doc/manual/release-notes/rl-2305.section.md
···8888 `services.dnsmasq.extraConfig` will be deprecated when NixOS 22.11 reaches
8989 end of life.
90909191+- The `dokuwiki` service now takes configuration via the `services.dokuwiki.sites.<name>.settings` attribute set, `extraConfig` is deprecated and will be removed.
9292+ The `{aclUse,superUser,disableActions}` attributes have been renamed, `pluginsConfig` now also accepts an attribute set of booleans, passing plain PHP is deprecated.
9393+ Same applies to `acl` which now also accepts structured settings.
9494+9195- To reduce closure size in `nixos/modules/profiles/minimal.nix` profile disabled installation documentations and manuals. Also disabled `logrotate` and `udisks2` services.
92969397- The minimal ISO image now uses the `nixos/modules/profiles/minimal.nix` profile.
+252-95
nixos/modules/services/web-apps/dokuwiki.nix
···88 user = "dokuwiki";
99 webserver = config.services.${cfg.webserver};
10101111- dokuwikiAclAuthConfig = hostName: cfg: pkgs.writeText "acl.auth-${hostName}.php" ''
1111+ mkPhpIni = generators.toKeyValue {
1212+ mkKeyValue = generators.mkKeyValueDefault {} " = ";
1313+ };
1414+ mkPhpPackage = cfg: cfg.phpPackage.buildEnv {
1515+ extraConfig = mkPhpIni cfg.phpOptions;
1616+ };
1717+1818+ dokuwikiAclAuthConfig = hostName: cfg: let
1919+ inherit (cfg) acl;
2020+ acl_gen = concatMapStringsSep "\n" (l: "${l.page} \t ${l.actor} \t ${toString l.level}");
2121+ in pkgs.writeText "acl.auth-${hostName}.php" ''
1222 # acl.auth.php
1323 # <?php exit()?>
1424 #
1525 # Access Control Lists
1626 #
1717- ${toString cfg.acl}
2727+ ${if isString acl then acl else acl_gen acl}
1828 '';
19292020- dokuwikiLocalConfig = hostName: cfg: pkgs.writeText "local-${hostName}.php" ''
2121- <?php
2222- $conf['savedir'] = '${cfg.stateDir}';
2323- $conf['superuser'] = '${toString cfg.superUser}';
2424- $conf['useacl'] = '${toString cfg.aclUse}';
2525- $conf['disableactions'] = '${cfg.disableActions}';
3030+ mergeConfig = cfg: {
3131+ useacl = false; # Dokuwiki default
3232+ savedir = cfg.stateDir;
3333+ } // cfg.settings;
3434+3535+ writePhpFile = name: text: pkgs.writeTextFile {
3636+ inherit name;
3737+ text = "<?php\n${text}";
3838+ checkPhase = "${pkgs.php81}/bin/php --syntax-check $target";
3939+ };
4040+4141+ mkPhpValue = v: let
4242+ isHasAttr = s: isAttrs v && hasAttr s v;
4343+ in
4444+ if isString v then escapeShellArg v
4545+ # NOTE: If any value contains a , (comma) this will not get escaped
4646+ else if isList v && any lib.strings.isCoercibleToString v then escapeShellArg (concatMapStringsSep "," toString v)
4747+ else if isInt v then toString v
4848+ else if isBool v then toString (if v then 1 else 0)
4949+ else if isHasAttr "_file" then "trim(file_get_contents(${lib.escapeShellArg v._file}))"
5050+ else if isHasAttr "_raw" then v._raw
5151+ else abort "The dokuwiki localConf value ${lib.generators.toPretty {} v} can not be encoded."
5252+ ;
5353+5454+ mkPhpAttrVals = v: flatten (mapAttrsToList mkPhpKeyVal v);
5555+ mkPhpKeyVal = k: v: let
5656+ values = if (isAttrs v && (hasAttr "_file" v || hasAttr "_raw" v )) || !isAttrs v then
5757+ [" = ${mkPhpValue v};"]
5858+ else
5959+ mkPhpAttrVals v;
6060+ in map (e: "[${escapeShellArg k}]${e}") (flatten values);
6161+6262+ dokuwikiLocalConfig = hostName: cfg: let
6363+ conf_gen = c: map (v: "$conf${v}") (mkPhpAttrVals c);
6464+ in writePhpFile "local-${hostName}.php" ''
6565+ ${concatStringsSep "\n" (conf_gen cfg.mergedConfig)}
2666 ${toString cfg.extraConfig}
2767 '';
28682929- dokuwikiPluginsLocalConfig = hostName: cfg: pkgs.writeText "plugins.local-${hostName}.php" ''
3030- <?php
3131- ${cfg.pluginsConfig}
6969+ dokuwikiPluginsLocalConfig = hostName: cfg: let
7070+ pc = cfg.pluginsConfig;
7171+ pc_gen = pc: concatStringsSep "\n" (mapAttrsToList (n: v: "$plugins['${n}'] = ${boolToString v};") pc);
7272+ in writePhpFile "plugins.local-${hostName}.php" ''
7373+ ${if isString pc then pc else pc_gen pc}
3274 '';
3333-34753576 pkg = hostName: cfg: pkgs.stdenv.mkDerivation rec {
3677 pname = "dokuwiki-${hostName}";
···4283 cp -r * $out/
43844485 # symlink the dokuwiki config
4545- ln -s ${dokuwikiLocalConfig hostName cfg} $out/share/dokuwiki/local.php
8686+ ln -sf ${dokuwikiLocalConfig hostName cfg} $out/share/dokuwiki/conf/local.php
46874788 # symlink plugins config
4848- ln -s ${dokuwikiPluginsLocalConfig hostName cfg} $out/share/dokuwiki/plugins.local.php
8989+ ln -sf ${dokuwikiPluginsLocalConfig hostName cfg} $out/share/dokuwiki/conf/plugins.local.php
49905050- # symlink acl
5151- ln -s ${dokuwikiAclAuthConfig hostName cfg} $out/share/dokuwiki/acl.auth.php
9191+ # symlink acl (if needed)
9292+ ${optionalString (cfg.mergedConfig.useacl && cfg.acl != null) "ln -sf ${dokuwikiAclAuthConfig hostName cfg} $out/share/dokuwiki/acl.auth.php"}
52935394 # symlink additional plugin(s) and templates(s)
5454- ${concatMapStringsSep "\n" (template: "ln -s ${template} $out/share/dokuwiki/lib/tpl/${template.name}") cfg.templates}
5555- ${concatMapStringsSep "\n" (plugin: "ln -s ${plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}") cfg.plugins}
9595+ ${concatMapStringsSep "\n" (template: "ln -sf ${template} $out/share/dokuwiki/lib/tpl/${template.name}") cfg.templates}
9696+ ${concatMapStringsSep "\n" (plugin: "ln -sf ${plugin} $out/share/dokuwiki/lib/plugins/${plugin.name}") cfg.plugins}
5697 '';
5798 };
5899100100+ aclOpts = { ... }: {
101101+ options = {
102102+103103+ page = mkOption {
104104+ type = types.str;
105105+ description = "Page or namespace to restrict";
106106+ example = "start";
107107+ };
108108+109109+ actor = mkOption {
110110+ type = types.str;
111111+ description = "User or group to restrict";
112112+ example = "@external";
113113+ };
114114+115115+ level = let
116116+ available = {
117117+ "none" = 0;
118118+ "read" = 1;
119119+ "edit" = 2;
120120+ "create" = 4;
121121+ "upload" = 8;
122122+ "delete" = 16;
123123+ };
124124+ in mkOption {
125125+ type = types.enum ((attrValues available) ++ (attrNames available));
126126+ apply = x: if isInt x then x else available.${x};
127127+ description = ''
128128+ Permission level to restrict the actor(s) to.
129129+ See <https://www.dokuwiki.org/acl#background_info> for explanation
130130+ '';
131131+ example = "read";
132132+ };
133133+134134+ };
135135+ };
136136+59137 siteOpts = { config, lib, name, ... }:
60138 {
139139+ imports = [
140140+ # NOTE: These will sadly not print the absolute argument path but only the name. Related to #96006
141141+ (mkRenamedOptionModule [ "aclUse" ] [ "settings" "useacl" ] )
142142+ (mkRenamedOptionModule [ "superUser" ] [ "settings" "superuser" ] )
143143+ (mkRenamedOptionModule [ "disableActions" ] [ "settings" "disableactions" ] )
144144+ ({ config, options, name, ...}: {
145145+ config.warnings =
146146+ (optional (isString config.pluginsConfig) ''
147147+ Passing plain strings to services.dokuwiki.sites.${name}.pluginsConfig has been deprecated and will not be continue to be supported in the future.
148148+ Please pass structured settings instead.
149149+ '')
150150+ ++ (optional (isString config.acl) ''
151151+ Passing a plain string to services.dokuwiki.sites.${name}.acl has been deprecated and will not continue to be supported in the future.
152152+ Please pass structured settings instead.
153153+ '')
154154+ ++ (optional (config.extraConfig != null) ''
155155+ services.dokuwiki.sites.${name}.extraConfig is deprecated and will be removed in the future.
156156+ Please pass structured settings to services.dokuwiki.sites.${name}.settings instead.
157157+ '')
158158+ ;
159159+ })
160160+ ];
161161+61162 options = {
62163 enable = mkEnableOption (lib.mdDoc "DokuWiki web application.");
63164···75176 };
7617777178 acl = mkOption {
7878- type = types.nullOr types.lines;
179179+ type = with types; nullOr (oneOf [ lines (listOf (submodule aclOpts)) ]);
79180 default = null;
8080- example = "* @ALL 8";
181181+ example = literalExpression ''
182182+ [
183183+ {
184184+ page = "start";
185185+ actor = "@external";
186186+ level = "read";
187187+ }
188188+ {
189189+ page = "*";
190190+ actor = "@users";
191191+ level = "upload";
192192+ }
193193+ ]
194194+ '';
81195 description = lib.mdDoc ''
82196 Access Control Lists: see <https://www.dokuwiki.org/acl>
83197 Mutually exclusive with services.dokuwiki.aclFile
···9020491205 aclFile = mkOption {
92206 type = with types; nullOr str;
9393- default = if (config.aclUse && config.acl == null) then "/var/lib/dokuwiki/${name}/acl.auth.php" else null;
207207+ default = if (config.mergedConfig.useacl && config.acl == null) then "/var/lib/dokuwiki/${name}/acl.auth.php" else null;
94208 description = lib.mdDoc ''
95209 Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
96210 Mutually exclusive with services.dokuwiki.acl which is preferred.
···100214 example = "/var/lib/dokuwiki/${name}/acl.auth.php";
101215 };
102216103103- aclUse = mkOption {
104104- type = types.bool;
105105- default = true;
106106- description = lib.mdDoc ''
107107- Necessary for users to log in into the system.
108108- Also limits anonymous users. When disabled,
109109- everyone is able to create and edit content.
110110- '';
111111- };
112112-113217 pluginsConfig = mkOption {
114114- type = types.lines;
115115- default = ''
116116- $plugins['authad'] = 0;
117117- $plugins['authldap'] = 0;
118118- $plugins['authmysql'] = 0;
119119- $plugins['authpgsql'] = 0;
120120- '';
218218+ type = with types; oneOf [lines (attrsOf bool)];
219219+ default = {
220220+ authad = false;
221221+ authldap = false;
222222+ authmysql = false;
223223+ authpgsql = false;
224224+ };
121225 description = lib.mdDoc ''
122226 List of the dokuwiki (un)loaded plugins.
123227 '';
124228 };
125229126126- superUser = mkOption {
127127- type = types.nullOr types.str;
128128- default = "@admin";
129129- description = lib.mdDoc ''
130130- You can set either a username, a list of usernames (“admin1,admin2”),
131131- or the name of a group by prepending an @ char to the groupname
132132- Consult documentation <https://www.dokuwiki.org/config:superuser> for further instructions.
133133- '';
134134- };
135135-136230 usersFile = mkOption {
137231 type = with types; nullOr str;
138138- default = if config.aclUse then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
232232+ default = if config.mergedConfig.useacl then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
139233 description = lib.mdDoc ''
140234 Location of the dokuwiki users file. List of users. Format:
141235···150244 example = "/var/lib/dokuwiki/${name}/users.auth.php";
151245 };
152246153153- disableActions = mkOption {
154154- type = types.nullOr types.str;
155155- default = "";
156156- example = "search,register";
157157- description = lib.mdDoc ''
158158- Disable individual action modes. Refer to
159159- <https://www.dokuwiki.org/config:action_modes>
160160- for details on supported values.
161161- '';
162162- };
163163-164247 plugins = mkOption {
165248 type = types.listOf types.path;
166249 default = [];
···173256 '';
174257 example = literalExpression ''
175258 let
176176- # Let's package the icalevents plugin
177177- plugin-icalevents = pkgs.stdenv.mkDerivation {
259259+ plugin-icalevents = pkgs.stdenv.mkDerivation rec {
178260 name = "icalevents";
179179- # Download the plugin from the dokuwiki site
180180- src = pkgs.fetchurl {
181181- url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/2017-06-16/dokuwiki-plugin-icalevents-2017-06-16.zip";
182182- sha256 = "e40ed7dd6bbe7fe3363bbbecb4de481d5e42385b5a0f62f6a6ce6bf3a1f9dfa8";
261261+ version = "2017-06-16";
262262+ src = pkgs.fetchzip {
263263+ stripRoot = false;
264264+ url = "https://github.com/real-or-random/dokuwiki-plugin-icalevents/releases/download/''${version}/dokuwiki-plugin-icalevents-''${version}.zip";
265265+ hash = "sha256-IPs4+qgEfe8AAWevbcCM9PnyI0uoyamtWeg4rEb+9Wc=";
183266 };
184184- sourceRoot = ".";
185185- # We need unzip to build this package
186186- buildInputs = [ pkgs.unzip ];
187187- # Installing simply means copying all files to the output directory
188267 installPhase = "mkdir -p $out; cp -R * $out/";
189268 };
190269 # And then pass this theme to the plugin list like this:
···204283 '';
205284 example = literalExpression ''
206285 let
207207- # Let's package the bootstrap3 theme
208208- template-bootstrap3 = pkgs.stdenv.mkDerivation {
209209- name = "bootstrap3";
210210- # Download the theme from the dokuwiki site
211211- src = pkgs.fetchurl {
212212- url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip";
213213- sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6";
214214- };
215215- # We need unzip to build this package
216216- buildInputs = [ pkgs.unzip ];
217217- # Installing simply means copying all files to the output directory
218218- installPhase = "mkdir -p $out; cp -R * $out/";
286286+ template-bootstrap3 = pkgs.stdenv.mkDerivation rec {
287287+ name = "bootstrap3";
288288+ version = "2022-07-27";
289289+ src = pkgs.fetchFromGitHub {
290290+ owner = "giterlizzi";
291291+ repo = "dokuwiki-template-bootstrap3";
292292+ rev = "v''${version}";
293293+ hash = "sha256-B3Yd4lxdwqfCnfmZdp+i/Mzwn/aEuZ0ovagDxuR6lxo=";
219294 };
295295+ installPhase = "mkdir -p $out; cp -R * $out/";
296296+ };
220297 # And then pass this theme to the template list like this:
221298 in [ template-bootstrap3 ]
222299 '';
···238315 '';
239316 };
240317318318+ phpPackage = mkOption {
319319+ type = types.package;
320320+ relatedPackages = [ "php80" "php81" ];
321321+ default = pkgs.php81;
322322+ defaultText = "pkgs.php81";
323323+ description = lib.mdDoc ''
324324+ PHP package to use for this dokuwiki site.
325325+ '';
326326+ };
327327+328328+ phpOptions = mkOption {
329329+ type = types.attrsOf types.str;
330330+ default = {};
331331+ description = lib.mdDoc ''
332332+ Options for PHP's php.ini file for this dokuwiki site.
333333+ '';
334334+ example = literalExpression ''
335335+ {
336336+ "opcache.interned_strings_buffer" = "8";
337337+ "opcache.max_accelerated_files" = "10000";
338338+ "opcache.memory_consumption" = "128";
339339+ "opcache.revalidate_freq" = "15";
340340+ "opcache.fast_shutdown" = "1";
341341+ }
342342+ '';
343343+ };
344344+345345+ settings = mkOption {
346346+ type = types.attrsOf types.anything;
347347+ default = {
348348+ useacl = true;
349349+ superuser = "admin";
350350+ };
351351+ description = lib.mdDoc ''
352352+ Structural DokuWiki configuration.
353353+ Refer to <https://www.dokuwiki.org/config>
354354+ for details and supported values.
355355+ Settings can either be directly set from nix,
356356+ loaded from a file using `._file` or obtained from any
357357+ PHP function calls using `._raw`.
358358+ '';
359359+ example = literalExpression ''
360360+ {
361361+ title = "My Wiki";
362362+ userewrite = 1;
363363+ disableactions = [ "register" ]; # Will be concatenated with commas
364364+ plugin.smtp = {
365365+ smtp_pass._file = "/var/run/secrets/dokuwiki/smtp_pass";
366366+ smtp_user._raw = "getenv('DOKUWIKI_SMTP_USER')";
367367+ };
368368+ }
369369+ '';
370370+ };
371371+372372+ mergedConfig = mkOption {
373373+ readOnly = true;
374374+ default = mergeConfig config;
375375+ defaultText = literalExpression ''
376376+ {
377377+ useacl = true;
378378+ }
379379+ '';
380380+ description = lib.mdDoc ''
381381+ Read only representation of the final configuration.
382382+ '';
383383+ };
384384+241385 extraConfig = mkOption {
386386+ # This Option is deprecated and only kept until sometime before 23.05 for compatibility reasons
387387+ # FIXME (@e1mo): Actually remember removing this before 23.05.
388388+ visible = false;
242389 type = types.nullOr types.lines;
243390 default = null;
244391 example = ''
···249396 DokuWiki configuration. Refer to
250397 <https://www.dokuwiki.org/config>
251398 for details on supported values.
399399+400400+ **Note**: Please pass Structured settings via
401401+ `services.dokuwiki.sites.${name}.settings` instead.
252402 '';
253403 };
254404405405+ # Required for the mkRenamedOptionModule
406406+ # TODO: Remove me once https://github.com/NixOS/nixpkgs/issues/96006 is fixed
407407+ # or the aclUse, ... options are removed.
408408+ warnings = mkOption {
409409+ type = types.listOf types.unspecified;
410410+ default = [ ];
411411+ visible = false;
412412+ internal = true;
255413 };
256414257415 };
416416+ };
258417in
259418{
260260- # interface
261419 options = {
262420 services.dokuwiki = {
263421···276434 Further nginx configuration can be done by adapting `services.nginx.virtualHosts.<name>`.
277435 See [](#opt-services.nginx.virtualHosts) for further information.
278436279279- Further apache2 configuration can be done by adapting `services.httpd.virtualHosts.<name>`.
280280- See [](#opt-services.httpd.virtualHosts) for further information.
437437+ Further caddy configuration can be done by adapting `services.caddy.virtualHosts.<name>`.
438438+ See [](#opt-services.caddy.virtualHosts) for further information.
281439 '';
282440 };
283441···287445 # implementation
288446 config = mkIf (eachSite != {}) (mkMerge [{
289447448448+ warnings = flatten (mapAttrsToList (_: cfg: cfg.warnings) eachSite);
449449+290450 assertions = flatten (mapAttrsToList (hostName: cfg:
291451 [{
292292- assertion = cfg.aclUse -> (cfg.acl != null || cfg.aclFile != null);
293293- message = "Either services.dokuwiki.sites.${hostName}.acl or services.dokuwiki.sites.${hostName}.aclFile is mandatory if aclUse true";
452452+ assertion = cfg.mergedConfig.useacl -> (cfg.acl != null || cfg.aclFile != null);
453453+ message = "Either services.dokuwiki.sites.${hostName}.acl or services.dokuwiki.sites.${hostName}.aclFile is mandatory if settings.useacl is true";
294454 }
295455 {
296296- assertion = cfg.usersFile != null -> cfg.aclUse != false;
297297- message = "services.dokuwiki.sites.${hostName}.aclUse must must be true if usersFile is not null";
456456+ assertion = cfg.usersFile != null -> cfg.mergedConfig.useacl != false;
457457+ message = "services.dokuwiki.sites.${hostName}.settings.useacl must must be true if usersFile is not null";
298458 }
299459 ]) eachSite);
300460···303463 inherit user;
304464 group = webserver.group;
305465306306- phpPackage = pkgs.php81;
307307- phpEnv = {
308308- DOKUWIKI_LOCAL_CONFIG = "${dokuwikiLocalConfig hostName cfg}";
309309- DOKUWIKI_PLUGINS_LOCAL_CONFIG = "${dokuwikiPluginsLocalConfig hostName cfg}";
310310- } // optionalAttrs (cfg.usersFile != null) {
466466+ phpPackage = mkPhpPackage cfg;
467467+ phpEnv = optionalAttrs (cfg.usersFile != null) {
311468 DOKUWIKI_USERS_AUTH_CONFIG = "${cfg.usersFile}";
312312- } //optionalAttrs (cfg.aclUse) {
469469+ } // optionalAttrs (cfg.mergedConfig.useacl) {
313470 DOKUWIKI_ACL_AUTH_CONFIG = if (cfg.acl != null) then "${dokuwikiAclAuthConfig hostName cfg}" else "${toString cfg.aclFile}";
314471 };
315472
···11diff --git a/SConstruct b/SConstruct
22-index 32cb644..0b3a208 100644
22+index 32cb644..650333a 100644
33--- a/SConstruct
44+++ b/SConstruct
55-@@ -225,6 +225,11 @@ if env['PLATFORM'] == 'posix':
55+@@ -6,7 +6,7 @@
66+ # application, then calls the sconscripts for libfluxus and
77+ # the fluxus Racket modules
88+99+-import os, os.path, sys, commands, subprocess
1010++import os, os.path, sys, subprocess
1111+1212+ MajorVersion = "0"
1313+ MinorVersion = "19"
1414+@@ -225,13 +225,18 @@ if env['PLATFORM'] == 'posix':
615 ["asound", "alsa/asoundlib.h"],
716 ["openal", "AL/al.h"]]
88-1717+918+env.Append(ENV={'PATH': ' ' + os.environ['PATH'], })
1019+env.Append(LIBPATH=ARGUMENTS.get('LIBPATH', '').split(':'))
1120+env.Append(CCFLAGS=' ' + os.environ.get('NIX_CFLAGS_COMPILE',''))
···1322+
1423 ################################################################################
1524 # Make sure we have these libraries availible
1616-2525+2626+ if not GetOption('clean'):
2727+- print '--------------------------------------------------------'
2828+- print 'Fluxus: Configuring Build Environment'
2929+- print '--------------------------------------------------------'
3030++ print('--------------------------------------------------------')
3131++ print('Fluxus: Configuring Build Environment')
3232++ print('--------------------------------------------------------')
3333+ # detect ode precision
3434+ if not GetOption('clean'):
3535+ try:
3636+@@ -240,27 +245,27 @@ if not GetOption('clean'):
3737+ if isinstance(ode_str[0], str):
3838+ env.MergeFlags(ode_str[0])
3939+ except:
4040+- print 'WARNING: unable to run ode-config, cannot detect ODE precision'
4141++ print('WARNING: unable to run ode-config, cannot detect ODE precision')
4242+4343+ conf = Configure(env)
4444+4545+ # check Racket and OpenAL frameworks on osx
4646+ if env['PLATFORM'] == 'darwin':
4747+ if not conf.CheckHeader('scheme.h'):
4848+- print "ERROR: 'racket3m' must be installed!"
4949++ print("ERROR: 'racket3m' must be installed!")
5050+ Exit(1)
5151+ if racket_framework:
5252+ LibList = filter(lambda x: x[0] != 'racket3m', LibList)
5353+ # OpenAL should be installed everywhere
5454+ if not conf.CheckHeader('OpenAL/al.h'):
5555+- print "ERROR: 'OpenAL' must be installed!"
5656++ print("ERROR: 'OpenAL' must be installed!")
5757+ Exit(1)
5858+5959+ # all libraries are required, and some of them require each other,
6060+ # hence the order is important, and autoadd=1
6161+ for (lib,headers) in LibList:
6262+ if not conf.CheckLibWithHeader(lib, headers, 'C', autoadd = 1):
6363+- print "ERROR: '%s' must be installed!" % (lib)
6464++ print("ERROR: '%s' must be installed!" % (lib))
6565+ Exit(1)
6666+6767+ if not conf.CheckFunc("dInitODE2"):
6868+@@ -334,7 +339,7 @@ if not GetOption('clean'):
6969+ ])
7070+7171+ if raco_status != 0:
7272+- print "ERROR: Failed to run command 'raco'"
7373++ print("ERROR: Failed to run command 'raco'")
7474+ Exit(1)
7575+7676+7777+@@ -377,8 +382,8 @@ if not GetOption('clean') and static_modules:
7878+7979+ app_env['LIBS'].remove("pthread")
8080+ app_env['LIBS'].remove("dl")
8181+- app_env['LIBS'].remove("ode")
8282+- app_env['LIBS'].remove("sndfile")
8383++ app_env['LIBS'].remove("ode")
8484++ app_env['LIBS'].remove("sndfile")
8585+8686+ # now go through the rest of the libs, removing them from
8787+ # the environment at the same time
8888+@@ -425,7 +430,7 @@ SConscript(dirs = build_dirs,
8989+ if not GetOption('clean'):
9090+ helpmap_status = subprocess.call(["racket", "makehelpmap.scm"], cwd="docs/helpmap")
9191+ if helpmap_status != 0:
9292+- print "ERROR: Failed to build 'docs/helpmap'"
9393++ print("ERROR: Failed to build 'docs/helpmap'")
9494+ Exit(1)
9595+9696+ ################################################################################
···28282929 nativeBuildInputs = [ meson ninja pkg-config ];
30303131+ NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) "-U__ARM_NEON__";
3232+3133 meta = with lib; {
3234 homepage = "https://github.com/Samsung/rlottie";
3335 description = "A platform independent standalone c++ library for rendering vector based animations and art in realtime";
3436 license = with licenses; [ mit bsd3 mpl11 ftl ];
3537 platforms = platforms.all;
3638 maintainers = with maintainers; [ CRTified ];
3737- # never built on aarch64-darwin since first introduction in nixpkgs
3838- broken = stdenv.isDarwin && stdenv.isAarch64;
3939 };
4040}