summaryrefslogtreecommitdiffstats
path: root/lib/tests
AgeCommit message (Collapse)Author
2020-09-17lib/generators.toPretty: Improved string printing, handling newlinesSilvan Mosberger
2020-09-17lib/generators.toPretty: Implement multiline printingSilvan Mosberger
2020-09-17lib/generators.toPretty: Only quote attribute names if necessarySilvan Mosberger
2020-08-24Don't set $NIX_DB_DIREelco Dolstra
This variable was removed in 2016.
2020-08-15Merge pull request #82743 from Infinisil/partially-typed-v2Robert Hensing
Freeform modules
2020-08-14lib/modules: Add syntactic sugar for config._module.freeformTypeSilvan Mosberger
This introduces `freeformType` as a top-level module attribute, allowing definitions like { freeformType = ...; options = ...; config = ...; }
2020-08-10lib/modules: Fix freeform modules when there's no definitionsSilvan Mosberger
2020-08-04Define a i686-genode system doubleEmery Hemingway
2020-08-03lib/tests: Add tests for freeform modulesSilvan Mosberger
2020-07-31lib/*: editorconfig fixeszowoq
2020-07-22Merge pull request #93568 from aaronjanse/aj-redoxJohn Ericson
Add Redox OS as a target
2020-07-21redox: add as targetAaron Janse
2020-07-20lib: toHex -> toHexString & toBase -> toBaseDigitsBas van Dijk
This makes the type of these functions more apparent from the name.
2020-07-20lib: add the toHex and toBase utility functionsBas van Dijk
`toHex` converts the given positive integer to a string of the hexadecimal representation of that integer. For example: ``` toHex 0 => "0" toHex 16 => "10" toHex 250 => "FA" ``` `toBase base i` converts the positive integer `i` to a list of it digits in the given `base`. For example: ``` toBase 10 123 => [ 1 2 3 ] toBase 2 6 => [ 1 1 0 ] toBase 16 250 => [ 15 10 ] ```
2020-04-25lib/tests: Allow overriding pkgs independent of lib being testedSilvan Mosberger
2020-04-13lib/maintainer-list: Implement validity checksSilvan Mosberger
2020-04-13lib/tests/release.nix: Avoid importing nixpkgs into the storeSilvan Mosberger
Improves build time by about a factor of two on my system
2020-04-13lib/tests/modules.sh: Don't depend on $PWDSilvan Mosberger
2020-04-02Merge pull request #83241 from Infinisil/valid-drv-nameSilvan Mosberger
lib/strings: Add `sanitizeDerivationName` function
2020-03-30lib/strings: Add sanitizeDerivationName functionSilvan Mosberger
2020-03-24lib/systems: Add Genode platform definitionsEmery Hemingway
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
2020-03-19Merge pull request #82882 from obsidiansystems/armv6-embeddedJohn Ericson
Misc fixes for armv6 bare metal cross
2020-03-19lib/tests: Check for nested option-dependent definitionsSilvan Mosberger
2020-03-19Revert "lib/modules: Throw better error when definitions assign to an option ↵Silvan Mosberger
set" This reverts commit 15c873b486347e7861c64fb0b5a7852be9fc82e4. This was causing infinite recursion when depending on nested options
2020-03-18lib: Fix systems test for new `armv6l-none`John Ericson
2020-03-18Merge pull request #82751 from Infinisil/minor-module-improvementsRobert Hensing
Minor module improvements
2020-03-18lib/modules: Fix type checks not being done before mergingSilvan Mosberger
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2020-03-18lib/modules: Throw better error when definitions assign to an option setSilvan Mosberger
2020-03-17lib/modules: Test the ability for config to depend on options for compatibilityRobert Hensing
2020-03-10lib/generators: Add toINI option for duplicate keysSilvan Mosberger
2020-02-10lib/tests/misc.nix: Don't make a copy on NixpkgsEelco Dolstra
2020-02-10lib/tests/misc.nix: Fix dependency on currentSystemEelco Dolstra
This doesn't work in pure mode.
2020-01-23lib/cli,lib/tests/misc: somewhat more standard formattingProfpatsch
2020-01-23lib/cli: encodeGNUCommandLine -> toGNUCommandLineShellProfpatsch
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.
2020-01-14Merge pull request #75539 from Gabriel439/gabriel/renderOptionsRobert Hensing
Add `pkgs.lib.encodeGNUCommandLine`
2020-01-12Merge pull request #76861 from Infinisil/paths-as-submodulesRobert Hensing
lib/types: Allow paths as submodule values
2020-01-10lib/tests: Add tests for attrsOf and lazyAttrsOfSilvan Mosberger
2020-01-10lib/tests: Fix module testsSilvan Mosberger
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.
2020-01-10lib/tests: Add test case for imports from derivationsSilvan Mosberger
2020-01-09Merge pull request #76857 from Infinisil/recursive-disableModulesSilvan Mosberger
Apply `disabledModules` recursively
2020-01-09lib/tests: Add tests for recursive disabledModulesSilvan Mosberger
2020-01-08lib/types: Allow paths as submodule valuesSilvan Mosberger
2020-01-06lib/tests: remove strictly loaOf tests and rebase on attrsOfrnhmjoj
2020-01-05Factor out a `toGNUCommandLine` utilityGabriel Gonzalez
... as suggested by @roberth
2020-01-03lib/tests: Temporarily disable submodule path testSilvan Mosberger
Until https://github.com/NixOS/nixpkgs/pull/76861 or so is merged
2020-01-02Module system improvements for NixOS as a submodule (#75031)Silvan Mosberger
Module system improvements for NixOS as a submodule
2020-01-02lib/tests: Add submoduleWith testsSilvan Mosberger
2019-12-15Use a more realistic example that exercises all encodingsGabriel Gonzalez
... as suggested by @roberth This also caught a bug in rendering lists, which this change also fixes
2019-12-13Make behavior of `encodeGNUCommandLine` customizableGabriel Gonzalez
... based on feedback from @edolstra
2019-12-13Rename `renderOptions` to `encodeGNUCommandLine`Gabriel Gonzalez
... as suggested by @edolstra