···34let
5 inherit (builtins) head tail length;
6- inherit (lib.trivial) and;
7 inherit (lib.strings) concatStringsSep sanitizeDerivationName;
8- inherit (lib.lists) foldr foldl' concatMap concatLists elemAt;
9in
1011rec {
···73 getAttrFromPath ["z" "z"] x
74 => error: cannot find attribute `z.z'
75 */
76- getAttrFromPath = attrPath: set:
77 let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
78- in attrByPath attrPath (abort errorMsg) set;
798081 /* Return the specified attributes from a set.
···154 foldAttrs (n: a: [n] ++ a) [] [{ a = 2; } { a = 3; }]
155 => { a = [ 2 3 ]; }
156 */
157- foldAttrs = op: nul: list_of_attrs:
158 foldr (n: a:
159 foldr (name: o:
160 o // { ${name} = op n.${name} (a.${name} or nul); }
161 ) a (attrNames n)
162- ) {} list_of_attrs;
163164165 /* Recursively collect sets that verify a given predicate named `pred'
···295 */
296 mapAttrsRecursiveCond = cond: f: set:
297 let
298- recurse = path: set:
299 let
300 g =
301 name: value:
302 if isAttrs value && cond value
303 then recurse (path ++ [name]) value
304 else f (path ++ [name]) value;
305- in mapAttrs g set;
306 in recurse [] set;
307308···369 value = f name (catAttrs name sets);
370 }) names);
371372- /* Implementation note: Common names appear multiple times in the list of
373 names, hopefully this does not affect the system because the maximal
374 laziness avoid computing twice the same expression and listToAttrs does
375 not care about duplicated attribute names.
···420 let f = attrPath:
421 zipAttrsWith (n: values:
422 let here = attrPath ++ [n]; in
423- if tail values == []
424- || pred here (head (tail values)) (head values) then
425 head values
426 else
427 f here values
···447 }
448449 */
450- recursiveUpdate = lhs: rhs:
451- recursiveUpdateUntil (path: lhs: rhs:
452- !(isAttrs lhs && isAttrs rhs)
453- ) lhs rhs;
454455 /* Returns true if the pattern is contained in the set. False otherwise.
456···459 => true
460 */
461 matchAttrs = pattern: attrs: assert isAttrs pattern;
462- foldr and true (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
463- let pat = head values; val = head (tail values); in
464 if length values == 1 then false
465 else if isAttrs pat then isAttrs val && matchAttrs pat val
466 else pat == val
···34let
5 inherit (builtins) head tail length;
6+ inherit (lib.trivial) id;
7 inherit (lib.strings) concatStringsSep sanitizeDerivationName;
8+ inherit (lib.lists) foldr foldl' concatMap concatLists elemAt all;
9in
1011rec {
···73 getAttrFromPath ["z" "z"] x
74 => error: cannot find attribute `z.z'
75 */
76+ getAttrFromPath = attrPath:
77 let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
78+ in attrByPath attrPath (abort errorMsg);
798081 /* Return the specified attributes from a set.
···154 foldAttrs (n: a: [n] ++ a) [] [{ a = 2; } { a = 3; }]
155 => { a = [ 2 3 ]; }
156 */
157+ foldAttrs = op: nul:
158 foldr (n: a:
159 foldr (name: o:
160 o // { ${name} = op n.${name} (a.${name} or nul); }
161 ) a (attrNames n)
162+ ) {};
163164165 /* Recursively collect sets that verify a given predicate named `pred'
···295 */
296 mapAttrsRecursiveCond = cond: f: set:
297 let
298+ recurse = path:
299 let
300 g =
301 name: value:
302 if isAttrs value && cond value
303 then recurse (path ++ [name]) value
304 else f (path ++ [name]) value;
305+ in mapAttrs g;
306 in recurse [] set;
307308···369 value = f name (catAttrs name sets);
370 }) names);
371372+ /* Implementation note: Common names appear multiple times in the list of
373 names, hopefully this does not affect the system because the maximal
374 laziness avoid computing twice the same expression and listToAttrs does
375 not care about duplicated attribute names.
···420 let f = attrPath:
421 zipAttrsWith (n: values:
422 let here = attrPath ++ [n]; in
423+ if length values == 1
424+ || pred here (elemAt values 1) (head values) then
425 head values
426 else
427 f here values
···447 }
448449 */
450+ recursiveUpdate = recursiveUpdateUntil (path: lhs: rhs: !(isAttrs lhs && isAttrs rhs));
000451452 /* Returns true if the pattern is contained in the set. False otherwise.
453···456 => true
457 */
458 matchAttrs = pattern: attrs: assert isAttrs pattern;
459+ all id (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
460+ let pat = head values; val = elemAt values 1; in
461 if length values == 1 then false
462 else if isAttrs pat then isAttrs val && matchAttrs pat val
463 else pat == val
···119 <link xlink:href="options.html#opt-services.archisteamfarm.enable">services.archisteamfarm</link>.
120 </para>
121 </listitem>
0000000000000000122 </itemizedlist>
123 </section>
124 <section xml:id="sec-release-22.05-incompatibilities">
···204 <literal>/etc/docker/daemon.json</literal>, you need to
205 incorporate the changes into the new option
206 <literal>virtualisation.docker.daemon.settings</literal>.
000000207 </para>
208 </listitem>
209 <listitem>
···119 <link xlink:href="options.html#opt-services.archisteamfarm.enable">services.archisteamfarm</link>.
120 </para>
121 </listitem>
122+ <listitem>
123+ <para>
124+ <link xlink:href="https://goteleport.com">teleport</link>,
125+ allows engineers and security professionals to unify access
126+ for SSH servers, Kubernetes clusters, web applications, and
127+ databases across all environments. Available at
128+ <link linkend="opt-services.teleport.enable">services.teleport</link>.
129+ </para>
130+ </listitem>
131+ <listitem>
132+ <para>
133+ <link xlink:href="https://loic-sharma.github.io/BaGet/">BaGet</link>,
134+ a lightweight NuGet and symbol server. Available at
135+ <link linkend="opt-services.baget.enable">services.baget</link>.
136+ </para>
137+ </listitem>
138 </itemizedlist>
139 </section>
140 <section xml:id="sec-release-22.05-incompatibilities">
···220 <literal>/etc/docker/daemon.json</literal>, you need to
221 incorporate the changes into the new option
222 <literal>virtualisation.docker.daemon.settings</literal>.
223+ </para>
224+ </listitem>
225+ <listitem>
226+ <para>
227+ opensmtpd-extras is no longer build with python2 scripting
228+ support due to python2 deprecation in nixpkgs
229 </para>
230 </listitem>
231 <listitem>
+6
nixos/doc/manual/release-notes/rl-2205.section.md
···3738- [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm), a C# application with primary purpose of idling Steam cards from multiple accounts simultaneously. Available as [services.archisteamfarm](options.html#opt-services.archisteamfarm.enable).
39000040## Backward Incompatibilities {#sec-release-22.05-incompatibilities}
4142- `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`.
···69 Scripts have to be converted to Python 3 for use with `writers.writePython3` or `writers.writePyPy2` needs to be used.
7071- If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`.
007273- The `autorestic` package has been upgraded from 1.3.0 to 1.5.0 which introduces breaking changes in config file, check [their migration guide](https://autorestic.vercel.app/migration/1.4_1.5) for more details.
74
···3738- [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm), a C# application with primary purpose of idling Steam cards from multiple accounts simultaneously. Available as [services.archisteamfarm](options.html#opt-services.archisteamfarm.enable).
3940+- [teleport](https://goteleport.com), allows engineers and security professionals to unify access for SSH servers, Kubernetes clusters, web applications, and databases across all environments. Available at [services.teleport](#opt-services.teleport.enable).
41+42+- [BaGet](https://loic-sharma.github.io/BaGet/), a lightweight NuGet and symbol server. Available at [services.baget](#opt-services.baget.enable).
43+44## Backward Incompatibilities {#sec-release-22.05-incompatibilities}
4546- `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`.
···73 Scripts have to be converted to Python 3 for use with `writers.writePython3` or `writers.writePyPy2` needs to be used.
7475- If you previously used `/etc/docker/daemon.json`, you need to incorporate the changes into the new option `virtualisation.docker.daemon.settings`.
76+77+- opensmtpd-extras is no longer build with python2 scripting support due to python2 deprecation in nixpkgs
7879- The `autorestic` package has been upgraded from 1.3.0 to 1.5.0 which introduces breaking changes in config file, check [their migration guide](https://autorestic.vercel.app/migration/1.4_1.5) for more details.
80
···1+{ cert, group, groups, user }: {
2+ assertion = cert.group == group || builtins.any (u: u == user) groups.${cert.group}.members;
3+ message = "Group for certificate ${cert.domain} must be ${group}, or user ${user} must be a member of group ${cert.group}";
4+}
···1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, SDL2
5+, SDL2_image
6+, SDL2_mixer
7+, SDL2_ttf
8+, gettext
9+, libpng
10+, pkg-config
11+, zlib
12+}:
13+14+stdenv.mkDerivation rec {
15+ pname = "the-legend-of-edgar";
16+ version = "1.35";
17+18+ src = fetchFromGitHub {
19+ name = "${pname}-${version}-src";
20+ owner = "riksweeney";
21+ repo = "edgar";
22+ rev = version;
23+ hash = "sha256-ojy4nEW9KiSte/AoFUMPrKCxvIeQpMVIL4ileHiBydo=";
24+ };
25+26+ nativeBuildInputs = [
27+ pkg-config
28+ gettext
29+ ];
30+31+ buildInputs = [
32+ SDL2
33+ SDL2_image
34+ SDL2_mixer
35+ SDL2_ttf
36+ libpng
37+ zlib
38+ ];
39+40+ dontConfigure = true;
41+42+ makefile = "makefile";
43+44+ makeFlags = [
45+ "PREFIX=${placeholder "out"}"
46+ "BIN_DIR=${placeholder "out"}/bin/"
47+ ];
48+49+ # TODO: remove the setting below when the next version arrives
50+ # https://github.com/riksweeney/edgar/pull/57
51+ preBuild = ''
52+ export CFLAGS=$(sdl2-config --cflags)
53+ '';
54+55+ meta = with lib; {
56+ homepage = "https://www.parallelrealities.co.uk/games/edgar";
57+ description = "A 2D platform game with a persistent world";
58+ longDescription = ''
59+ When Edgar's father fails to return home after venturing out one dark and
60+ stormy night, Edgar fears the worst: he has been captured by the evil
61+ sorcerer who lives in a fortress beyond the forbidden swamp.
62+63+ Donning his armour, Edgar sets off to rescue him, but his quest will not
64+ be easy...
65+66+ The Legend of Edgar is a platform game, not unlike those found on the
67+ Amiga and SNES. Edgar must battle his way across the world, solving
68+ puzzles and defeating powerful enemies to achieve his quest.
69+ '';
70+ license = licenses.gpl1Plus;
71+ maintainers = with maintainers; [ AndersonTorres ];
72+ platforms = platforms.unix;
73+ broken = stdenv.isDarwin;
74+ };
75+}