Jörg Thalheim
948488343b
Merge pull request #24835 from Profpatsch/lib-doc-improvements
...
Lib doc improvements
2017-05-05 07:10:11 +01:00
Tom Saeger
5989515b94
lib: trivial spelling fixes
2017-04-19 19:37:55 -05:00
Profpatsch
ce4ff6b4f4
lib/tests.nix: add section headers
2017-04-18 02:57:28 +02:00
Shea Levy
b2c87fbf98
lib: Add test for composeExtensions
2017-04-12 12:40:24 -04:00
zimbatm
3bbab17575
Merge pull request #23929 from Profpatsch/lib-lists-doc
...
Improve lib/trivial and lib/lists docs
2017-03-20 14:42:58 +00:00
Profpatsch
4f1d977877
lib/tests: add more tests for fold functions
...
Also the invocation of tests is documented.
2017-03-19 22:06:53 +01:00
Léo Gaspard
da6619cffe
libs: make splitString also split last separator ( #23851 )
...
* libs: make splitString also split last separator
* libs: add tests for splitStrings
2017-03-15 21:16:04 +00:00
Benjamin Staffin
d9123a2329
lib: fix mixed tab/space indents, trailing whitespace, etc
...
Nix style seems to have settled on not using spaces between bound
variable names and the lambda : so I also tried to make those somewhat
more consistent throughout.
2017-03-11 17:48:43 -05:00
Profpatsch
271c0f5451
lib/generators: mkKeyValueLine -> mkKeyValueLine ( #20920 )
...
Rename, since the previous name was potentially confusing.
2016-12-06 23:19:34 +01:00
Profpatsch
ea412cd5a1
lib/generators: add toKeyValue & mkKeyValueLine ( #20903 )
...
generators for the common use case of simple config files which hold keys and
values. Used in the implementation for toINI.
2016-12-04 22:11:24 +01:00
Profpatsch
26eb10e771
lib: add generator functions for toJSON & toYAML
...
They both reference the toJSON builtin, so we get semantic identifiers
that express the intent of the generation.
Both should be able to map each nix value (minus functions) to the
destination config files.
Includes two invocation unit tests.
2016-11-17 23:16:24 +01:00
Profpatsch
61311665cb
lib: add ini configuration generator
...
Many configurations are INI-style files. Attribute sets can be mapped
rather painlessly to the INI format.
This adds a function toINI inside a new generators library section.
Also, unit tests for the default values are provided.
2016-11-17 19:46:41 +01:00
Christian Zagrodnick
ce96057588
add helper to lib/attrsets: hasAttrByPath
2015-12-07 11:04:14 +01:00
Christian Zagrodnick
1cdacc6aa2
lib/strings: add a toInt
helper ( close #11242 )
...
While the function itself is pretty easy, it's not straitforward to find a way to convert string to int with nix.
2015-11-25 08:50:02 +01:00
Eelco Dolstra
5fef92c4a0
Move pkgs/lib/ to lib/
2013-10-10 13:28:21 +02:00