summaryrefslogtreecommitdiff
path: root/lib/tests (follow)
Commit message (Expand)AuthorAgeFilesLines
* lib/tests: Allow overriding pkgs independent of lib being testedSilvan Mosberger2020-04-252-8/+18
* lib/maintainer-list: Implement validity checksSilvan Mosberger2020-04-132-1/+76
* lib/tests/release.nix: Avoid importing nixpkgs into the store•••Improves build time by about a factor of two on my system Silvan Mosberger2020-04-131-3/+3
* lib/tests/modules.sh: Don't depend on $PWDSilvan Mosberger2020-04-131-1/+4
* Merge pull request #83241 from Infinisil/valid-drv-name•••lib/strings: Add `sanitizeDerivationName` functionSilvan Mosberger2020-04-021-0/+42
|\
| * lib/strings: Add sanitizeDerivationName functionSilvan Mosberger2020-03-301-0/+42
* | lib/systems: Add Genode platform definitions•••Add platform definitions for 64-bit ARM and x86. This is sufficient for for building Genode where a toolchain is provided as an overlay. Toolchain: git+https://git.sr.ht/~ehmry/genodepkgs?rev=14fc773ac9ecd2cbb30cb4612b284eee83d83546 Emery Hemingway2020-03-241-2/+3
* | Merge pull request #82882 from obsidiansystems/armv6-embedded•••Misc fixes for armv6 bare metal crossJohn Ericson2020-03-191-1/+1
|\ \
| * | lib: Fix systems test for new `armv6l-none`John Ericson2020-03-181-1/+1
* | | lib/tests: Check for nested option-dependent definitionsSilvan Mosberger2020-03-194-0/+42
* | | Revert "lib/modules: Throw better error when definitions assign to an option ...•••This reverts commit 15c873b486347e7861c64fb0b5a7852be9fc82e4. This was causing infinite recursion when depending on nested options Silvan Mosberger2020-03-192-6/+0
* | | Merge pull request #82751 from Infinisil/minor-module-improvements•••Minor module improvementsRobert Hensing2020-03-182-0/+11
|\ \ \
| * | | lib/modules: Fix type checks not being done before merging•••Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Silvan Mosberger2020-03-181-0/+4
| * | | lib/modules: Throw better error when definitions assign to an option setSilvan Mosberger2020-03-182-0/+7
* | | | lib/modules: Test the ability for config to depend on options for compatibilityRobert Hensing2020-03-172-0/+21
|/ / /
* / / lib/generators: Add toINI option for duplicate keysSilvan Mosberger2020-03-101-0/+12
|/ /
* | lib/tests/misc.nix: Don't make a copy on NixpkgsEelco Dolstra2020-02-101-1/+1
* | lib/tests/misc.nix: Fix dependency on currentSystem•••This doesn't work in pure mode. Eelco Dolstra2020-02-101-1/+1
|/
* lib/cli,lib/tests/misc: somewhat more standard formattingProfpatsch2020-01-231-35/+26
* lib/cli: encodeGNUCommandLine -> toGNUCommandLineShell•••The semantic difference between `encode` and `to` is not apparent. Users are likely to confuse both functions (which leads to unexpected error messages about the wrong types). Like in `generators.nix`, all functions should be prefixed by `to`. Furthermore, converting to a string depends on the target context. In this case, it’s a POSIX shell, so we should name it that (compare `escapeShellArg` in `strings.nix`). We can later add versions that escape for embedding in e.g. python scripts or similar. Profpatsch2020-01-231-2/+27
* Merge pull request #75539 from Gabriel439/gabriel/renderOptions•••Add `pkgs.lib.encodeGNUCommandLine`Robert Hensing2020-01-141-0/+21
|\
| * Factor out a `toGNUCommandLine` utility•••... as suggested by @roberth Gabriel Gonzalez2020-01-051-1/+1
| * Use a more realistic example that exercises all encodings•••... as suggested by @roberth This also caught a bug in rendering lists, which this change also fixes Gabriel Gonzalez2019-12-151-6/+10
| * Make behavior of `encodeGNUCommandLine` customizable•••... based on feedback from @edolstra Gabriel Gonzalez2019-12-131-0/+1
| * Rename `renderOptions` to `encodeGNUCommandLine`•••... as suggested by @edolstra Gabriel Gonzalez2019-12-131-1/+1
| * Add `pkgs.lib.renderOptions`•••This adds a new utility to intelligently convert Nix records to command line options to reduce boilerplate for simple use cases and to also reduce the likelihood of malformed command lines Gabriel Gonzalez2019-12-111-0/+16
* | Merge pull request #76861 from Infinisil/paths-as-submodules•••lib/types: Allow paths as submodule valuesRobert Hensing2020-01-121-2/+1
|\ \
| * | lib/types: Allow paths as submodule valuesSilvan Mosberger2020-01-081-2/+1
* | | lib/tests: Add tests for attrsOf and lazyAttrsOfSilvan Mosberger2020-01-105-0/+35
* | | lib/tests: Fix module tests•••Fix the broken test in https://github.com/NixOS/nixpkgs/pull/77416 Apparently hydra uses `nix-build lib/tests/release.nix` to run all tests, where IFD isn't allowed. Fortunately we can get around this with builtins.toFile, which doesn't require IFD, but still can test the properties we want. Silvan Mosberger2020-01-101-9/+3
* | | lib/tests: Add test case for imports from derivationsSilvan Mosberger2020-01-102-1/+21
* | | Merge pull request #76857 from Infinisil/recursive-disableModules•••Apply `disabledModules` recursivelySilvan Mosberger2020-01-096-0/+38
|\ \ \ | |/ / |/| |
| * | lib/tests: Add tests for recursive disabledModulesSilvan Mosberger2020-01-096-0/+38
* | | lib/tests: remove strictly loaOf tests and rebase on attrsOfrnhmjoj2020-01-0623-103/+59
* | | lib/tests: Temporarily disable submodule path test•••Until https://github.com/NixOS/nixpkgs/pull/76861 or so is merged Silvan Mosberger2020-01-031-1/+2
|/ /
* | Module system improvements for NixOS as a submodule (#75031)•••Module system improvements for NixOS as a submoduleSilvan Mosberger2020-01-028-0/+110
|\ \
| * | lib/tests: Add submoduleWith testsSilvan Mosberger2020-01-028-0/+110
| |/
* | Merge branch 'ghcjs-cross-without-cc-19.09' into ghcjs-cross-without-ccJohn Ericson2019-11-251-1/+1
|\ \ | |/ |/|
| * Fix lib tests•••js-ghcjs didn't fit in an existing categor. John Ericson2019-11-251-1/+1
* | lib/trivial: add `pipe` function•••`pipe` is a useful operator for creating pipelines of functions. It works around the usual problem of e.g. string operations becoming deeply nested functions. In principle, there are four different ways this function could be written: pipe val [ f1 .. fn ] pipe val [ fn .. f1 ] compose [ f1 .. fn ] val compose [ fn .. f1 ] val The third and fourth form mirror composition of functions, they would be the same as e.g. `(f1 << f2 << f3 .. << fn) val`. However, it is not clear which direction the list should have (as one can see in the second form, which is the most absurd. In order not to confuse users, we decide for the most “intuitive” form, which mirrors the way unix pipes work (thus the name `pipe`). The flow of data goes from left to right. Co-Authored-By: Silvan Mosberger <infinisil@icloud.com> Profpatsch2019-10-211-0/+25
* | Merge pull request #70194 from obsidiansystems/lib-more-arm•••lib: Add armv7a-linux to doubles.nixMatthew Bauer2019-10-011-2/+2
|\|
| * lib: Add armv7a-linux to doubles.nix•••This is needed for android. John Ericson2019-10-011-2/+2
* | lib: basic tests for lib.versionsJoachim Fasting2019-09-261-0/+15
|/
* lib/types: Add oneOf, extension of either to a list of typesSilvan Mosberger2019-08-063-0/+23
* make-tarball / lib-tests: reduce duplication•••The misc.nix and systems.nix tests were invoked at three different places. Let's not that. Frederik Rietdijk2019-07-111-11/+4
* Revert "Revert "systems/doubles.nix: add Apple doubles""•••This reverts commit ce2f74df2cade57e74c235292c8b074281903e71. Doubles are treated as -darwin here, to provide some consistency. There is some ambiguity between “x86_64-darwin” and “i686-darwin” which could refer to binaries linked between iOS simulator or real macOS binaries. useiOSPrebuilt can be used to determine which to use, however. Matthew Bauer2019-07-101-3/+3
* systems: fix lib-tests•••These were broken by the added system doubles. This just adds those to the lib-tests. Matthew Bauer2019-06-041-5/+5
* tests/systems: fix testsMatthew Bauer2019-04-251-1/+1
* Fix the documentation for the tests to reflect what is actually happening.(cdep)illabout2019-02-072-2/+8
* lib/modules: Change mkAliasOptionModule to use the priority for the alias.•••This commit changes the `mkAliasOptionModule` function to make sure that the priority for the aliased option is propagated to the non-aliased option. This also affects the `mkRenamedOptionModule` function in a similar fashion. This also removes the `mkAliasOptionModuleWithPriority` function, since its functionality is now subsumed by `mkAliasOptionModule`. This change was recommended by @nbp: https://github.com/NixOS/nixpkgs/pull/53397#discussion_r245487432 (cdep)illabout2019-01-243-3/+3