summary refs log tree commit diff
path: root/lib
Commit message (Collapse)AuthorAge
* Merge pull request #147077 from Infinisil/updateAttrPathsRobert Hensing2022-03-19
|\ | | | | Introduce `lib.updateManyAttrsByPath`
| * lib.attrsets: Introduce updateManyAttrsByPathSilvan Mosberger2022-03-18
| |
| * lib.lists: Use builtins.groupBy for lib.groupBySilvan Mosberger2022-03-18
| | | | | | | | | | builtins.groupBy is much more performant. It was introduced in https://github.com/NixOS/nix/pull/5715
| * lib.attrsets: Introduce showAttrPathSilvan Mosberger2022-03-18
| |
* | Merge pull request #161158 from a-m-joseph/mips64el-support-first-stepsJohn Ericson2022-03-17
|\ \ | | | | | | mips64el support
| * | Ericson2314's suggestion here: ↵Adam Joseph2022-03-10
| | | | | | | | | | | | https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822295406
| * | This commit adds only comments to platforms.nix.Adam Joseph2022-03-10
| | |
| * | comment: explain why gnuabi64 has a rustc.config but gnuabin32 does not.Adam Joseph2022-03-10
| | |
| * | remove float = "hard" from mips entriesAdam Joseph2022-03-10
| | |
| * | https://github.com/NixOS/nixpkgs/pull/161158#pullrequestreview-903824553Adam Joseph2022-03-10
| | |
| * | lib/systems: add mips64el definitionsAdam Joseph2022-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MIPS has a large space of {architecture,abi,endianness}; this commit adds all of them to lib/systems/platforms.nix so we can be done with it. Currently lib/systems/inspect.nix has a single "isMips" predicate, which is a bit ambiguous now that we will have both mips32 and mips64 support, with the latter having two ABIs. Let's add four new predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and treat the now-ambiguous isMips as deprecated in favor of the more-specific predicates. These predicates are used mainly for enabling/disabling target-specific workarounds, and it is extremely rare that a platform-specific workaround is needed, and both mips32 and mips64 need exactly the same workaround. The separate predicates (isMips64n32 and isMips64n64) for ABI distinctions are, unfortunately, useful. Boost's user-scheduled threading (used by nix) does does not currently supports mips64n32, which is a very desirable ABI on routers since they rarely have more than 2**32 bytes of DRAM.
* | | Merge pull request #162271 from Infinisil/warn-no-typeRobert Hensing2022-03-16
|\ \ \ | | | | | | | | Throw an error for options without a type
| * | | lib/options: Throw error for options without a typeJanne Heß2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes all options rendered in the manual throw an error if they don't have a type specified. This is a follow-up to #76184 Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
* | | | Merge pull request #156533 from ↵Silvan Mosberger2022-03-16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | hercules-ci/issue-146882-transparent-submodule-options lib.modules: Let module declare options directly in bare submodule
| * | | | lib/modules.nix: Add comment about internal shorthand null valueRobert Hensing2022-03-07
| | | | |
| * | | | lib/tests/modules: Add test case for duplicate option error file locationRobert Hensing2022-03-07
| | | | |
| * | | | lib/modules.nix: Move comment to the actual legacy codeRobert Hensing2022-03-07
| | | | |
| * | | | Revert "lib.modules: Remove redundant fixupOptionType in option injection"Robert Hensing2022-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6b077c47ff14cb9a4a8f5cb8986fa83ff626c732. Thanks Infinisil for discovering this problem: > After a lot of trial and error, trying to prove why fixupOptionType should > be used here or not, I figured it out: It's needed for the sake of file > locations in error messages.
| * | | | lib.modules: Inline a private functionRobert Hensing2022-03-03
| | | | | | | | | | | | | | | | | | | | This should save about four calls per module.
| * | | | lib.modules: Default shorthandOnlyDefinesConfig to true when nullRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Remove redundant fixupOptionType in option injectionRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Make option injection work when shorthandOnlyDefinesConfigRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Improve option-is-prefix error messageRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Explain why options can only be merged into submodulesRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Refactor option scanning slightlyRobert Hensing2022-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This scans the options with fewer function calls, improving performance. It also removes a let Env from the happy flow of the new logic.
| * | | | lib.types.submodule: Remove redundant isSubmodule attrRobert Hensing2022-03-03
| | | | |
| * | | | lib.modules: Let module declare options directly in bare submoduleRobert Hensing2022-03-03
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... where a bare submodule is an option that has a type like `submoduleWith x`, as opposed to `attrsOf (submoduleWith x)`. This makes migration unnecessary when introducing a freeform type in an existing option tree. Closes #146882
* | | | Merge pull request #163127 from hercules-ci/optimize-optionSet-compatRobert Hensing2022-03-11
|\ \ \ \ | | | | | | | | | | lib/modules.nix: Optimize optionSet legacy compat code
| * | | | lib/modules.nix: Optimize optionSet legacy compat codeRobert Hensing2022-03-07
| |/ / / | | | | | | | | | | | | It's still in the hot path.
* | | | Merge pull request #163443 from ncfavier/fix-types-packageRobert Hensing2022-03-11
|\ \ \ \ | |_|_|/ |/| | | lib.types.package: only call toDerivation when necessary
| * | | lib.types.package: only call toDerivation when necessaryNaïm Favier2022-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current logic assumes that everything that isn't a derivation is a store path, but it can also be something that's *coercible* to a store path, like a flake input. Unnecessary uses of `lib.toDerivation` result in errors in pure evaluation mode when `builtins.storePath` is disabled. Also document what a `package` is.
* | | | lib.types.optionType: Only merge when necessaryRobert Hensing2022-03-10
| | | |
* | | | lib.isDerivation: SimplifyRobert Hensing2022-03-09
|/ / /
* / / lib/systems: Fix uclibc float-abi being flippedLevi Wright2022-03-07
|/ / | | | | uclibceabihf and uclibceabi's float hardness was flipped, which causes many headaches
* | Merge pull request #162283 from Infinisil/functionTo.descriptionSilvan Mosberger2022-03-02
|\ \ | | | | | | lib/types: Fix functionTo description
| * | lib/types: Fix functionTo descriptionSilvan Mosberger2022-03-01
| | |
* | | Merge pull request #149689 from Infinisil/types-typeSilvan Mosberger2022-03-02
|\ \ \ | |/ / |/| | Introduce `types.optionType` and use it for `freeformType`
| * | lib.modules: Use types.optionType for _module.freeformTypeSilvan Mosberger2022-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that the module file locations are propagated to the freeform type, which makes it so that submodules in freeform types now have their declaration location shown in the manual, fixing https://github.com/NixOS/nixpkgs/issues/132085. In addition, this also newly allows freeformTypes to be declared multiple times and all declarations being merged together according to normal option merging. This also removes some awkwardness regarding the type of `freeformType`
| * | lib.types: Introduce `types.optionType`Silvan Mosberger2022-03-01
| |/ | | | | | | | | | | This type correctly merges multiple option types together while also annotating them with file information. In a future commit this will be used for `_module.freeformType`
* | Merge pull request #157301 from pennae/lib-add-mkPackageOption0x4A6F2022-02-28
|\ \ | |/ |/| lib: add mkPackageOption to default.nix
| * lib: add mkPackageOption to default.nixpennae2022-01-29
| | | | | | | | this was forgotten in #155669
* | lib/modules: Use types.raw for _module.argsSilvan Mosberger2022-02-22
| | | | | | | | | | Fixes https://github.com/NixOS/nixpkgs/issues/53458, as types.raw doesn't allow setting multiple values
* | lib/types: Introduce types.raw for unprocessed valuesSilvan Mosberger2022-02-22
| |
* | lib/tests: Add tests for emptyValueSilvan Mosberger2022-02-17
| |
* | lib/types: Fix emptyValue of listOf and nonEmptyListOfSilvan Mosberger2022-02-17
| | | | | | | | | | | | An empty list is [], not {}! Also, non-empty lists shouldn't have a default of an empty list!
* | Merge pull request #155707 from 06kellyjac/fehRenaud2022-02-16
|\ \ | | | | | | feh: correct license
| * | feh: correct license06kellyjac2022-01-28
| | |
* | | Merge remote-tracking branch 'origin/master' into staging-nextJonathan Ringer2022-02-10
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: pkgs/top-level/aliases.nix
| * | | fix: typo in lib/attrsets.nixJohn Rinehart2022-02-10
| | | |
* | | | Merge remote-tracking branch 'origin/master' into staging-nextJonathan Ringer2022-02-06
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: pkgs/development/python-modules/pysdl2/default.nix pkgs/top-level/aliases.nix