summary refs log tree commit diff
path: root/lib
Commit message (Collapse)AuthorAge
* Clarify error message of 'assigning to top-level attribute' (#76702)Silvan Mosberger2020-01-08
|\ | | | | Clarify error message of 'assigning to top-level attribute'
| * lib/modules: clarify error message of 'assigning to top-level attribute'Arnout Engelen2020-01-05
| | | | | | | | | | | | | | If I understand correctly, the problem isn't so much that you're assigning to that top-level attribute, but that the assignment to the attribute (or any child of the attribute) introduces the 'config' object and prevents 'lifting' all settings to a generated 'config' object.
* | Merge pull request #77133 from Infinisil/fix-path-checkSilvan Mosberger2020-01-07
|\ \ | | | | | | lib/types: Fix path type check
| * | lib/types: Fix path type checkSilvan Mosberger2020-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when this function was called without a value coercible to a string it would throw an error instead of returning false. Now it does. As a result this now allows the use of a type like `either path attrs` without it erroring out when a definition is an attribute set. The warning about there not being a isPath primop was removed because this is not the case anymore, there is builtins.isPath. But also there always was `builtins.typeOf x == "path"` that could've been used instead. However the path type now stands for more than just path types, but absolute paths in general.
* | | lib/types: warn loaOf is deprecatedrnhmjoj2020-01-06
| | |
* | | lib/tests: remove strictly loaOf tests and rebase on attrsOfrnhmjoj2020-01-06
|/ /
* | lib/tests: Temporarily disable submodule path testSilvan Mosberger2020-01-03
| | | | | | | | Until https://github.com/NixOS/nixpkgs/pull/76861 or so is merged
* | Revert "lib/types: Allow paths as submodule values"Silvan Mosberger2020-01-03
| | | | | | | | | | | | | | | | | | This reverts commit eec83d41e3e7d9ad5bc1086198d972d55bab1203. This broke hydra evaluation because with this commit submodule values are allowed to be paths, however the certmgr module uses `either (submodule ...) path` in its type, meaning it already used paths for something else which would now be interpreted as a submodule.
* | Module system improvements for NixOS as a submodule (#75031)Silvan Mosberger2020-01-02
|\ \ | | | | | | Module system improvements for NixOS as a submodule
| * | lib/tests: Add submoduleWith testsSilvan Mosberger2020-01-02
| | |
| * | lib/types: Allow paths as submodule valuesSilvan Mosberger2020-01-02
| | |
| * | lib/modules: Don't pack submodules speciallySilvan Mosberger2020-01-01
| | | | | | | | | | | | | | | This has the beneficial side effect of allowing paths to be used as modules in types.{submodule,submoduleWith}
| * | lib/types: Add types.submoduleWith for more flexibility than types.submoduleSilvan Mosberger2020-01-01
| | |
| * | lib/modules: Make unifyModuleSyntax fully idempotentSilvan Mosberger2019-12-05
| | | | | | | | | | | | Because why not
| * | lib/modules: file -> _file for a more idempotent unifyModuleSyntaxSilvan Mosberger2019-12-05
| |/ | | | | | | This will be useful for doing more complicated module evaluations
* | Merge branch 'ghcjs-cross-without-cc-19.09' into ghcjs-cross-without-ccJohn Ericson2019-11-25
|\ \
| * | Fix lib testsJohn Ericson2019-11-25
| | | | | | | | | | | | js-ghcjs didn't fit in an existing categor.
* | | Merge remote-tracking branch 'upstream/master' into ghcjs-cross-without-ccJohn Ericson2019-11-25
|\ \ \ | |/ / |/| / | |/
| * Merge pull request #72657 from cleverca22/vc4John Ericson2019-11-24
| |\ | | | | | | Initial implementation of vc4 cross-compile
| | * initial implementation of vc4 cross-compileMichael Bishop2019-11-19
| | |
| * | Merge remote-tracking branch 'upstream/master' into wrapper-pname-supportJohn Ericson2019-11-24
| |\|
| | * Merge remote-tracking branch 'upstream/master' into mingw-mcfthreadsJohn Ericson2019-11-11
| | |\
| | | * Merge pull request #72727 from oxalica/mips-parseMatthew Bauer2019-11-06
| | | |\ | | | | | | | | | | lib.systems: handle mips family properly
| | | | * lib.systems: remove redundant mappingoxalica2019-11-04
| | | | |
| | | | * lib.systems: handle mips family properlyoxalica2019-11-03
| | | | |
| | | * | Add note: Keep error message in sync with nixos-optionChuck2019-11-04
| | | |/
| | | * Merge pull request #67809 from Infinisil/propagate-override-argsSilvan Mosberger2019-10-22
| | | |\ | | | | | | | | | | lib.makeOverridable: Propagate function arguments
| | | | * lib/makeOverridable: RefactorSilvan Mosberger2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename ff to result because that's what it is - Better indentation - Less parens - Comment what overrideWith does
| | | | * lib/makeOverridable: Remove unimplemented overrideDerivation for functionsSilvan Mosberger2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Apparently nobody ever needed this - We already have enough ways to override things - Using overrideDerivation is discouraged
| | | | * lib/makeOverridable: Propagate function args of the callPackage'd functionSilvan Mosberger2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows querying function arguments of things like fetchFromGitHub: nix-repl> lib.functionArgs pkgs.fetchFromGitHub { fetchSubmodules = true; githubBase = true; ... }
| | | | * lib/makeOverridable: Propagate function arguments to override functionsSilvan Mosberger2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows querying the arguments you can .override: nix-repl> lib.functionArgs pkgs.hello.override { fetchurl = false; stdenv = false; }
| | | | * lib/makeOverridable: Abstract result overridingSilvan Mosberger2019-09-05
| | | | |
| | | | * lib/makeOverridable: Deduplicate override definitionSilvan Mosberger2019-09-05
| | | | | | | | | | | | | | | | | | | | And call it overrideArgs in the let binding because that's what it does
| | | * | lib/trivial: add `pipe` functionProfpatsch2019-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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>
| | | * | Merge pull request #69746 from Infinisil/rem-opt-usage-messageSilvan Mosberger2019-10-02
| | | |\ \ | | | | | | | | | | | | lib.mkRemovedOptionModule: Show replacement for option usage too
| | | | * | lib.mkRemovedOptionModule: Show replacement for option usage tooSilvan Mosberger2019-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously mkRemovedOptionModule would only show the replacement instructions when the removed option was *defined*. With this change, it also does so when an option is *used*. This is essential for options that are only intended to be used such as `security.acme.directory`, whose replacement instructions would never trigger without this change because almost everybody only uses the option and isn't defining it.
| | | * | | Merge pull request #70194 from obsidiansystems/lib-more-armMatthew Bauer2019-10-01
| | | |\ \ \ | | | | | | | | | | | | | | lib: Add armv7a-linux to doubles.nix
| | | * \ \ \ mkRemovedOptionModule: assert on removed options (#69419)Silvan Mosberger2019-09-30
| | | |\ \ \ \ | | | | |_|/ / | | | |/| | | mkRemovedOptionModule: assert on removed options
| | | | * | | mkRemovedOptionModule: assert on removed optionsRobin Gloster2019-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want to ignore config that can mess up machines. In general this should always fail evaluation, as you think you are changing behaviour and don't, which can easily create run-time errors we can catch early.
| | | * | | | Merge pull request #69345 from joachifm/feat/split-versionJoachim F2019-09-27
| | | |\ \ \ \ | | | | |/ / / | | | |/| | | Replace uses of splitString for splitting version strings
| | | | * | | lib: basic tests for lib.versionsJoachim Fasting2019-09-26
| | | | | | |
| | | | * | | lib/versions: expose splitVersionJoachim Fasting2019-09-26
| | | | | | |
| | | * | | | licenses: refer to curl using spdxOrivej Desh2019-09-22
| | | | | | |
| | | * | | | qhull: specify spdx licenseOrivej Desh2019-09-22
| | | |/ / /
| | | * | | lib: fix typo in 'zipAttrsWith' documentationPeter Simons2019-09-11
| | | | | |
| | | * | | 20.03 is MarkhorSamuel Leathers2019-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Markhor is a spiral horned animal that is on the endangered species list * https://en.wikipedia.org/wiki/Markhor
* | | | | | Add support for cross compiling to `js-ghcjs`John Ericson2019-11-25
|/ / / / / | | | | | | | | | | | | | | | | | | | | This platform doesn't have a C compiler, and so relies and the changes in the previous commit to work.
* / / / / lib: Add getName to mirror getVersionJohn Ericson2019-11-24
|/ / / /
* | / / lib: Switch to w64 vendor for MinGWJohn Ericson2019-11-11
| |/ / |/| | | | | | | | It is needed for the `-municode` flag, supposedly.
* | | lib: Add armv7a-linux to doubles.nixJohn Ericson2019-10-01
|/ / | | | | | | This is needed for android.