lib: trivial spelling fixes
This commit is contained in:
parent
e662e035f9
commit
5989515b94
|
@ -116,7 +116,7 @@ rec {
|
||||||
listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
|
listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
|
||||||
|
|
||||||
|
|
||||||
/* Filter an attribute set recursivelly by removing all attributes for
|
/* Filter an attribute set recursively by removing all attributes for
|
||||||
which the given predicate return false.
|
which the given predicate return false.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -334,7 +334,7 @@ rec {
|
||||||
value = f name (catAttrs name sets);
|
value = f name (catAttrs name sets);
|
||||||
}) names);
|
}) names);
|
||||||
|
|
||||||
/* Implentation note: Common names appear multiple times in the list of
|
/* Implementation note: Common names appear multiple times in the list of
|
||||||
names, hopefully this does not affect the system because the maximal
|
names, hopefully this does not affect the system because the maximal
|
||||||
laziness avoid computing twice the same expression and listToAttrs does
|
laziness avoid computing twice the same expression and listToAttrs does
|
||||||
not care about duplicated attribute names.
|
not care about duplicated attribute names.
|
||||||
|
@ -353,7 +353,7 @@ rec {
|
||||||
zipAttrs = zipAttrsWith (name: values: values);
|
zipAttrs = zipAttrsWith (name: values: values);
|
||||||
|
|
||||||
/* Does the same as the update operator '//' except that attributes are
|
/* Does the same as the update operator '//' except that attributes are
|
||||||
merged until the given pedicate is verified. The predicate should
|
merged until the given predicate is verified. The predicate should
|
||||||
accept 3 arguments which are the path to reach the attribute, a part of
|
accept 3 arguments which are the path to reach the attribute, a part of
|
||||||
the first attribute set and a part of the second attribute set. When
|
the first attribute set and a part of the second attribute set. When
|
||||||
the predicate is verified, the value of the first attribute set is
|
the predicate is verified, the value of the first attribute set is
|
||||||
|
|
|
@ -39,7 +39,7 @@ let inherit (lib) nv nvs; in
|
||||||
#
|
#
|
||||||
# issues:
|
# issues:
|
||||||
# * its complicated to understand
|
# * its complicated to understand
|
||||||
# * some "features" such as exact merge behaviour are burried in mergeAttrBy
|
# * some "features" such as exact merge behaviour are buried in mergeAttrBy
|
||||||
# and defaultOverridableDelayableArgs assuming the default behaviour does
|
# and defaultOverridableDelayableArgs assuming the default behaviour does
|
||||||
# the right thing in the common case
|
# the right thing in the common case
|
||||||
# * Eelco once said using such fix style functions are slow to evaluate
|
# * Eelco once said using such fix style functions are slow to evaluate
|
||||||
|
@ -48,7 +48,7 @@ let inherit (lib) nv nvs; in
|
||||||
# / add patches the way you want without having to declare function arguments
|
# / add patches the way you want without having to declare function arguments
|
||||||
#
|
#
|
||||||
# nice features:
|
# nice features:
|
||||||
# declaring "optional featuers" is modular. For instance:
|
# declaring "optional features" is modular. For instance:
|
||||||
# flags.curl = {
|
# flags.curl = {
|
||||||
# configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
|
# configureFlags = ["--with-curl=${curl.dev}" "--with-curlwrappers"];
|
||||||
# buildInputs = [curl openssl];
|
# buildInputs = [curl openssl];
|
||||||
|
|
|
@ -10,7 +10,7 @@ rec {
|
||||||
|
|
||||||
/* `overrideDerivation drv f' takes a derivation (i.e., the result
|
/* `overrideDerivation drv f' takes a derivation (i.e., the result
|
||||||
of a call to the builtin function `derivation') and returns a new
|
of a call to the builtin function `derivation') and returns a new
|
||||||
derivation in which the attributes of the original are overriden
|
derivation in which the attributes of the original are overridden
|
||||||
according to the function `f'. The function `f' is called with
|
according to the function `f'. The function `f' is called with
|
||||||
the original derivation attributes.
|
the original derivation attributes.
|
||||||
|
|
||||||
|
|
|
@ -253,11 +253,11 @@ rec {
|
||||||
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
|
# eg { a = 7; } { a = [ 2 3 ]; } becomes { a = [ 7 2 3 ]; }
|
||||||
mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a: b: (toList a) ++ (toList b) );
|
mergeAttrsConcatenateValues = mergeAttrsWithFunc ( a: b: (toList a) ++ (toList b) );
|
||||||
|
|
||||||
# merges attributes using //, if a name exisits in both attributes
|
# merges attributes using //, if a name exists in both attributes
|
||||||
# an error will be triggered unless its listed in mergeLists
|
# an error will be triggered unless its listed in mergeLists
|
||||||
# so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get
|
# so you can mergeAttrsNoOverride { buildInputs = [a]; } { buildInputs = [a]; } {} to get
|
||||||
# { buildInputs = [a b]; }
|
# { buildInputs = [a b]; }
|
||||||
# merging buildPhase does'nt really make sense. The cases will be rare where appending /prefixing will fit your needs?
|
# merging buildPhase doesn't really make sense. The cases will be rare where appending /prefixing will fit your needs?
|
||||||
# in these cases the first buildPhase will override the second one
|
# in these cases the first buildPhase will override the second one
|
||||||
# ! deprecated, use mergeAttrByFunc instead
|
# ! deprecated, use mergeAttrByFunc instead
|
||||||
mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"],
|
mergeAttrsNoOverride = { mergeLists ? ["buildInputs" "propagatedBuildInputs"],
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# snippets that can be shared by mutliple fetchers (pkgs/build-support)
|
# snippets that can be shared by multiple fetchers (pkgs/build-support)
|
||||||
{
|
{
|
||||||
|
|
||||||
proxyImpureEnvVars = [
|
proxyImpureEnvVars = [
|
||||||
|
|
|
@ -191,7 +191,7 @@ rec {
|
||||||
*/
|
*/
|
||||||
optional = cond: elem: if cond then [elem] else [];
|
optional = cond: elem: if cond then [elem] else [];
|
||||||
|
|
||||||
/* Return a list or an empty list, dependening on a boolean value.
|
/* Return a list or an empty list, depending on a boolean value.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
optionals true [ 2 3 ]
|
optionals true [ 2 3 ]
|
||||||
|
|
|
@ -423,7 +423,7 @@ rec {
|
||||||
in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
|
in concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
|
||||||
|
|
||||||
/* Sort a list of properties. The sort priority of a property is
|
/* Sort a list of properties. The sort priority of a property is
|
||||||
1000 by default, but can be overriden by wrapping the property
|
1000 by default, but can be overridden by wrapping the property
|
||||||
using mkOrder. */
|
using mkOrder. */
|
||||||
sortProperties = defs:
|
sortProperties = defs:
|
||||||
let
|
let
|
||||||
|
|
|
@ -126,8 +126,8 @@ rec {
|
||||||
*/
|
*/
|
||||||
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
|
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
|
||||||
|
|
||||||
/* Dependening on the boolean `cond', return either the given string
|
/* Depending on the boolean `cond', return either the given string
|
||||||
or the empty string. Useful to contatenate against a bigger string.
|
or the empty string. Useful to concatenate against a bigger string.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
optionalString true "some-string"
|
optionalString true "some-string"
|
||||||
|
|
|
@ -231,7 +231,7 @@ runTests {
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
expr = generators.toJSON {} val;
|
expr = generators.toJSON {} val;
|
||||||
# trival implementation
|
# trivial implementation
|
||||||
expected = builtins.toJSON val;
|
expected = builtins.toJSON val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ runTests {
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
expr = generators.toYAML {} val;
|
expr = generators.toYAML {} val;
|
||||||
# trival implementation
|
# trivial implementation
|
||||||
expected = builtins.toJSON val;
|
expected = builtins.toJSON val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ rec {
|
||||||
{ # Human-readable representation of the type, should be equivalent to
|
{ # Human-readable representation of the type, should be equivalent to
|
||||||
# the type function name.
|
# the type function name.
|
||||||
name
|
name
|
||||||
, # Description of the type, defined recursively by embedding the the wrapped type if any.
|
, # Description of the type, defined recursively by embedding the wrapped type if any.
|
||||||
description ? null
|
description ? null
|
||||||
, # Function applied to each definition that should return true if
|
, # Function applied to each definition that should return true if
|
||||||
# its type-correct, false otherwise.
|
# its type-correct, false otherwise.
|
||||||
|
|
Loading…
Reference in New Issue