about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-06-01Merge pull request #234070 from tweag/pathType-testsRobert Hensing4-103/+110
Init `nixVersions.minimum` and fix `lib` tests for all Nix versions
2023-06-01lib/tests: Also run with nixVersions.minimum and nixVersions.unstableSilvan Mosberger1-48/+58
The previous commits ensure that the tests also succeed with those versions
2023-06-01lib/tests: Fix when run with Nix 2.3Silvan Mosberger2-10/+15
2023-06-01lib/tests/filesystem.sh: Check success and failure separatelySilvan Mosberger1-46/+37
2023-06-01lib.systems.doubles: add big-endian MIPS linux doublesAlyssa Ross2-5/+5
We already have examples for these, but since we didn't actually recognise the doubles, it wasn't possible to build any packages for them without setting allowUnsupportedSystem.
2023-06-01lib.systems: remove mipsisa(32|64)r6 triplesAlyssa Ross2-20/+10
These arc the same as the normal triples apart for a difference in -march, so there's no need for them to be separate triples.
2023-05-31lib.concatMapAttrs: Simplify stack traceRobert Hensing1-1/+5
2023-05-25lib.filesystem.pathType: Fix tests for Nix >= 2.14Silvan Mosberger1-2/+3
2023-05-23Merge pull request #224834 from tweag/pathType-and-coRobert Hensing5-22/+197
Improvements to pathType, pathIsDirectory and pathIsRegularFile
2023-05-2223.11 is Tapir 23.11-preRaito Bezarius1-1/+1
2023-05-22Merge pull request #233050 from NixOS/bsl-is-redistributableRyan Lahfa1-0/+1
lib/licenses: Business Source License 1.1 is redistributable
2023-05-22lib/filesystem.nix: Update top commentSilvan Mosberger1-1/+3
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22lib.filesystem.pathType: Use new builtins.readFileType if availableSilvan Mosberger1-11/+15
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22lib.filesystem.pathType and co.: Improve documentationSilvan Mosberger1-3/+40
2023-05-22lib.filesystem.pathType: Improve error for non-existent pathsSilvan Mosberger2-1/+6
Previously it would fail with error: attribute 'nonexistent' missing at nixpkgs/lib/filesystem.nix:29:10: 28| if dirOf path == path then "directory" 29| else (readDir (dirOf path)).${baseNameOf path}; | ^ 30|
2023-05-22lib.filesystem.pathType: Fix for filesystem root argumentSilvan Mosberger2-1/+9
Previously this function couldn't handle / being passed, it would throw an error: error: attribute '' missing at nixpkgs/lib/filesystem.nix:24:20: 23| */ 24| pathType = path: (readDir (dirOf path)).${baseNameOf path}; | ^ 25| Consequently this also fixes the lib.filesystem.{pathIsDirectory,pathIsRegularFile} functions.
2023-05-22lib.filesystem: Minor refactorSilvan Mosberger1-4/+6
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22lib.filesystem.pathType and co.: Add testsSilvan Mosberger2-0/+91
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-05-22Merge pull request #232808 from ncfavier/mkPackageOption-nullableRobert Hensing3-7/+38
lib/options: nullable mkPackageOption
2023-05-22lens: Change lens' listed license from MIT to their own proprietary license.Martin Wurm1-0/+6
Although Lens is based on a free core component ("OpenLens"), the tarballs provided by Mirantis include a proprietary version of Lens that requires a subscription. As the proprietary option offers additional features, it would not be wise to simply rewrite the derivation and base it on the FOSS source code. Instead, implementing a new derivation for OpenLens is likely the better approach.
2023-05-20lib/licenses: Business Source License 1.1 is redistributableRaito Bezarius1-0/+1
It is written in its text, still unfree though and cannot be used for *production*.
2023-05-20lib/tests: add mkPackageOption testsNaïm Favier2-0/+24
2023-05-19lib: fix typosfigsoda1-1/+1
2023-05-19lib/options: nullable mkPackageOptionNaïm Favier1-7/+14
It is sometimes useful to allow setting a package option to `null` to skip installing the package. See https://github.com/nix-community/home-manager/pull/3668#issuecomment-1554044171 for example.
2023-05-17lib.types.submoduleWith: Interoperate with older version of submoduleWithRobert Hensing1-3/+5
2023-05-15licenses: add CC-BY-NC-ND-4.0COLAMAroro1-0/+6
2023-05-15Merge pull request #210461 from benwbooth/jxplorerSandro1-0/+5
2023-05-12JXplorer: init at 3.3.1.2Ben Booth1-0/+5
2023-05-11Merge pull request #230523 from hercules-ci/fast-nixos-test-evalRobert Hensing1-0/+8
Fast nixos test eval
2023-05-10lib.types.pkgs: initRobert Hensing1-0/+8
A nominal type.
2023-05-09lib.systems: remove (accidental?) rust/rustc aliasAlyssa Ross1-1/+1
I imagine this was supposed to be rustc = args.rustc, like the other two lines. This meant that we accepted both rust and rustc attributes, with the same effect. I doubt anybody was using the undocumented, probably-accidental "rust" spelling, but we should remove it before somebody starts. In fact, we don't need to set rustc here at all, because no value platforms.select could return will ever include a rustc key (unlike the other two), so then rustc will be filled in later, when args is merged into final.
2023-05-09Merge pull request #228013 from amjoseph-nixpkgs/pr/qemuArch/mipsAdam Joseph1-0/+1
lib/systems: add mips64[el] entries to qemuArch
2023-05-08Merge pull request #230353 from ncfavier/defaultText-onlyNaïm Favier1-3/+3
lib/options: fix rendering of options with only a defaultText
2023-05-07Merge master into staging-nextgithub-actions[bot]10-49/+261
2023-05-06lib.modules: configurationClass -> classRobert Hensing2-2/+2
This simplifies the documentation. `configuration` is implied by `_type`.
2023-05-06lib.modules: in evalModules return move _module.class -> configurationClassRobert Hensing2-11/+2
2023-05-06lib.modules: Change class declaration in module to _classRobert Hensing4-10/+10
2023-05-06lib/tests/modules.sh: Add submodule + class testsRobert Hensing2-1/+49
2023-05-06lib/modules: Move class out of specialArgsRobert Hensing3-12/+30
2023-05-06lib/modules.nix: Deduplicate documentationRobert Hensing1-29/+2
`file://./..` looks redundant, but makes the url clickable in vscode.
2023-05-06lib/modules: Only interpret class declaration in non-shorthand modeRobert Hensing4-1/+19
This is to avoid stealing keys from submodules. `class` might be common enough that reinterpreting existing `class` attributes in configurations as a declaration leads to fairly widespread problems.
2023-05-06lib/modules.nix: Refactor: extract applyModuleArgsRobert Hensing1-5/+6
2023-05-06lib/modules.nix: Refactor: evaluate applyModuleArgsIfFunction in attrs caseRobert Hensing1-1/+1
2023-05-06lib/modules.nix: Restore old collectModules interfaceRobert Hensing1-1/+1
2023-05-06lib/modules: Explain that a configuration can't be loaded as a moduleRobert Hensing2-2/+7
2023-05-06lib/modules: Improve error when a configuration is importedRobert Hensing3-0/+14
This is appears to be a fairly common mistake for beginners who want to build larger things from the system configurations, such as NixOps networks, etc. Further explanation seems appropriate.
2023-05-06lib/modules: Check against importing things with a _typeRobert Hensing4-1/+20
2023-05-06lib/modules: Add class concept to check importsRobert Hensing5-4/+69
This improves the error message when an incompatible module is imported.
2023-05-06lib/modules.nix: Make some functions privateRobert Hensing1-11/+22
The supposedly public nature of these functions has been holding back module system maintenance, while usages of these functions are expected to be rare. If used anywhere, presumably they're emulating module system behavior because some use case isn't supported properly. We should try to support such a use case directly, if it even exists.
2023-05-06lib/modules.nix: Use explicit exportsRobert Hensing1-4/+52