···116116 listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
117117118118119119- /* Filter an attribute set recursivelly by removing all attributes for
119119+ /* Filter an attribute set recursively by removing all attributes for
120120 which the given predicate return false.
121121122122 Example:
···334334 value = f name (catAttrs name sets);
335335 }) names);
336336337337- /* Implentation note: Common names appear multiple times in the list of
337337+ /* Implementation note: Common names appear multiple times in the list of
338338 names, hopefully this does not affect the system because the maximal
339339 laziness avoid computing twice the same expression and listToAttrs does
340340 not care about duplicated attribute names.
···353353 zipAttrs = zipAttrsWith (name: values: values);
354354355355 /* Does the same as the update operator '//' except that attributes are
356356- merged until the given pedicate is verified. The predicate should
356356+ merged until the given predicate is verified. The predicate should
357357 accept 3 arguments which are the path to reach the attribute, a part of
358358 the first attribute set and a part of the second attribute set. When
359359 the predicate is verified, the value of the first attribute set is
+2-2
lib/composable-derivation.nix
···3939 #
4040 # issues:
4141 # * its complicated to understand
4242- # * some "features" such as exact merge behaviour are burried in mergeAttrBy
4242+ # * some "features" such as exact merge behaviour are buried in mergeAttrBy
4343 # and defaultOverridableDelayableArgs assuming the default behaviour does
4444 # the right thing in the common case
4545 # * Eelco once said using such fix style functions are slow to evaluate
···4848 # / add patches the way you want without having to declare function arguments
4949 #
5050 # nice features:
5151- # declaring "optional featuers" is modular. For instance:
5151+ # declaring "optional features" is modular. For instance:
5252 # flags.curl = {
5353 # configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
5454 # buildInputs = [curl openssl];
+1-1
lib/customisation.nix
···10101111 /* `overrideDerivation drv f' takes a derivation (i.e., the result
1212 of a call to the builtin function `derivation') and returns a new
1313- derivation in which the attributes of the original are overriden
1313+ derivation in which the attributes of the original are overridden
1414 according to the function `f'. The function `f' is called with
1515 the original derivation attributes.
1616
+2-2
lib/deprecated.nix
···253253 # eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
254254 mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a: b: (toList a) ++ (toList b) );
255255256256- # merges attributes using //, if a name exisits in both attributes
256256+ # merges attributes using //, if a name exists in both attributes
257257 # an error will be triggered unless its listed in mergeLists
258258 # so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get
259259 # { buildInputs = [a b]; }
260260- # merging buildPhase does'nt really make sense. The cases will be rare where appending /prefixing will fit your needs?
260260+ # merging buildPhase doesn't really make sense. The cases will be rare where appending /prefixing will fit your needs?
261261 # in these cases the first buildPhase will override the second one
262262 # ! deprecated, use mergeAttrByFunc instead
263263 mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"],
+1-1
lib/fetchers.nix
···11-# snippets that can be shared by mutliple fetchers (pkgs/build-support)
11+# snippets that can be shared by multiple fetchers (pkgs/build-support)
22{
3344 proxyImpureEnvVars = [
+1-1
lib/lists.nix
···191191 */
192192 optional = cond: elem: if cond then [elem] else [];
193193194194- /* Return a list or an empty list, dependening on a boolean value.
194194+ /* Return a list or an empty list, depending on a boolean value.
195195196196 Example:
197197 optionals true [ 2 3 ]
+1-1
lib/modules.nix
···423423 in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
424424425425 /* Sort a list of properties. The sort priority of a property is
426426- 1000 by default, but can be overriden by wrapping the property
426426+ 1000 by default, but can be overridden by wrapping the property
427427 using mkOrder. */
428428 sortProperties = defs:
429429 let
+2-2
lib/strings.nix
···126126 */
127127 makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
128128129129- /* Dependening on the boolean `cond', return either the given string
130130- or the empty string. Useful to contatenate against a bigger string.
129129+ /* Depending on the boolean `cond', return either the given string
130130+ or the empty string. Useful to concatenate against a bigger string.
131131132132 Example:
133133 optionalString true "some-string"
···5252 { # Human-readable representation of the type, should be equivalent to
5353 # the type function name.
5454 name
5555- , # Description of the type, defined recursively by embedding the the wrapped type if any.
5555+ , # Description of the type, defined recursively by embedding the wrapped type if any.
5656 description ? null
5757 , # Function applied to each definition that should return true if
5858 # its type-correct, false otherwise.