about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-08-31lib.importApply: init (#230588)Robert Hensing5-0/+75
* lib.modules.importApply: init Brings variables from rich scopes to modules defined in separate files. A helper for functions in files that return a module. * lib.modules.importApply: Edit doc Generally improve the quality. Notes: - Not rendered to the manual yet, so probably the syntax could be improved, but I have no way to test this now. - The docs use `arg` vs `staticArg` in the code. This is intentional, because the doc is pretty clear about the role of `arg` whereas the code exists in a context where ambiguities are more harmful. * Format
2024-08-29treewide: use a consistent meta.priority defaultPhilip Taron1-6/+9
2024-08-26lib/systems: set gcc.arch = "armv6kz", gcc.fpu = "vfpv2" for raspberryPiIvan Trubach1-2/+3
>The CPU in the Raspberry Pi 1 and Zero implements the ARMv6 ISA (with VFP2) https://wiki.debian.org/RaspberryPi#:~:text=The%20CPU%20in%20the%20Raspberry%20Pi,VFP2%29 See also - https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications - https://github.com/NixOS/nixpkgs/issues/319036#issuecomment-2232108373
2024-08-26cockroachdb-bin: Update licenses (#335770)Robert Scott1-0/+6
2024-08-26Merge pull request #326430 from tweag/formatting-rebuild-fixesRobert Hensing2-20/+28
Prevent some rebuilds for future Nix reformats
2024-08-25Merge pull request #333953 from mibmo/spdx-license-mappingSilvan Mosberger2-6/+39
lib.meta.licensesSpdx: mapping from SPDX ID to compatible licenses
2024-08-25lib/tests: Format a file with nixfmtSilvan Mosberger2-20/+28
And fix locations to not break the test. This is a rare case where another change is required after formatting. We do this in a separate commit so that we don't need to do it in the treewide reformatting PR.
2024-08-25lib.meta: Minor SPDX license function improvementsSilvan Mosberger2-6/+11
- Expose `lib.licensesSpdx` - Create bindings for the needed internal functions - Mention that some SPDX licenses might be missing (in the future I hope we can autogenerate the Nixpkgs license list from some SPDX endpoint
2024-08-24Merge pull request #333915 from jopejoe1/licenseSandro1-12/+7
lib/licenses: some corrections
2024-08-19Merge pull request #335139 from MattSturgeon/types_docrefSilvan Mosberger1-1/+1
lib/types: update reference to docs
2024-08-19lib.licenses: add CockroachDB Community License AgreementAlexander Ben Nasrallah1-0/+6
2024-08-17Merge pull request #329964 from Artturin/androidrenamesdkArtturin2-6/+22
treewide: Rename android `sdkVer` and `ndkVer`
2024-08-17Merge pull request #335311 from kakkun61/fix-markupJörg Thalheim1-1/+1
lib/customisation.nix: fix markup
2024-08-17just fix markupKazuki Okamoto1-1/+1
2024-08-16vscode-extensions.databricks.databricks: init at 2.3.1Salar Rahmanian1-0/+6
2024-08-16lib/types: update reference to docsMatt Sturgeon1-1/+1
The XML docs have been migrated to markdown since bfd21cd2c1492b799facdab2e77308c34edbe9e7
2024-08-15lib.meta.licensesSpdx: mapping from SPDX ID to licensesmib1-3/+31
2024-08-12Merge pull request #334117 from hercules-ci/test-modules-report-locationSilvan Mosberger1-5/+48
2024-08-12lib/tests/modules.sh: Improve failure log formatRobert Hensing1-6/+31
- Clear separation between failures - Move error regex close to error message, which is at the bottom of a fairly long trace - Move most relevant and consistent info to bottom of terminal: the location of the failure. Some editors including vscode heuristically resolve file paths on Ctrl+click. - Less wordy - easy to glance - Capitalized prefixes to distinguish from Nix's own logging
2024-08-12lib/tests/modules.sh: Add loc <depth> optional parameterRobert Hensing1-1/+7
2024-08-12lib/tests/modules.sh: Do not redirect diagnostics to stdoutRobert Hensing1-5/+5
It still prints its own diagnostics to stdout, but it's always done that.
2024-08-12lib/tests/modules.sh: Report failure source locationRobert Hensing1-0/+12
2024-08-11lib/licenses: remove incorrect comment about mit and x11jopejoe11-2/+0
Spdx has a diffrent id for both and so do we!
2024-08-11lib/licenses: remove libssh2 equivalent to bsd3jopejoe11-5/+0
2024-08-11lib/licenses: correct zsh to mit-modernjopejoe11-5/+6
2024-08-11lib/licenses: busl add spdxidjopejoe11-0/+1
2024-08-10lib.systems: mark windows as having shared libsTristan Ross1-1/+1
2024-07-31Merge pull request #307683 from RobWalt/radianceSandro1-0/+5
2024-07-27Doc: migrate lib.strings to commonmarkJohannes Kirschbauer1-564/+2002
2024-07-26treewide: remove unused lib (and other) argumentsSigmanificient11-11/+11
2024-07-26lib.trimWith: Minor doc improvementsSilvan Mosberger1-3/+4
2024-07-26Merge pull request #315411 from MattSturgeon/trimSilvan Mosberger3-1/+129
lib.strings: add `trim` and `trimWith`
2024-07-26treewide: fix doc typosPeder Bergebakken Sundt1-1/+1
Done with `fd \\\.md$ . --type f -x typos --write-changes`
2024-07-25lib.strings: add `trim` and `trimWith`Matt Sturgeon3-1/+129
`strings.trim` returns a copy of the string with all leading and trailing whitespace removed. `strings.trimWith` does the same thing, but calling code can decide whether to trim the start and/or end of the string.
2024-07-25lib.systems: throw if `sdkVer` or `ndkVer` are used for android.Artturin2-0/+18
Those attrs have been renamed and throwing is the best way to show it, if we only warned then the user would only get an error like this `error: Unsupported sdk: 33` from `pkgs/top-level/darwin-packages.nix`. If someone wants to support multiple NixOS versions then they can simply set both attrs. (`!args ? androidSdkVersion` is for that)
2024-07-25Merge pull request #149990 from ShamrockLee/lib-spdx-licenseSilvan Mosberger3-10/+72
2024-07-25treewide: Rename android `sdkVer` and `ndkVer`Artturin1-6/+4
`sdkVer` conflicts with the old `sdkVer`(now `darwinSdkVersion` but that still uses `sdkVer` if set) used by darwin This shouldn't be an issue but due to `pkgs/development/interpreters/python/cpython/default.nix` running `lib.filterAttrs (n: v: ! lib.isDerivation v && n != "passthruFun")` on it's inputs (2 of them are darwin only) the `throw "Unsupported sdk...` in `pkgs/top-level/darwin-packages.nix` will be triggered. After this change `pkgsCross.armv7a-android-prebuilt.python3.pythonOnBuildForHost` won't fail with `error: Unsupported sdk: 33` Issue was bisected to 3cb23cec239d4f73bb1b51f26ac7599384fdadd6
2024-07-24Merge pull request #328381 from tie/map-attrs-flattenSilvan Mosberger1-2/+3
2024-07-24lib/deprecated: print deprecation warning for mapAttrsFlattenIvan Trubach1-2/+2
2024-07-24Merge pull request #328582 from rhelmot/freebsd-stdenvJörg Thalheim1-2/+1
FreeBSD stdenv: re-init
2024-07-24Merge pull request #325384 from adisbladis/lib-licenses-factory-funcSomeone1-21/+25
lib.licenses: refactor internal mkLicense to avoid future typo bugs
2024-07-23Merge pull request #306481 from hercules-ci/lib-builtins-warnRobert Hensing1-41/+43
lib.warn: Use or behave like builtins.warn
2024-07-23lib.warn: Update docsRobert Hensing1-39/+29
- Bring up to date - Give meaning to the metavariables - Use italics for metavariables (just like the Nix manual) - Don't abbreviate - No hard feelings, Val.
2024-07-21lib: add getStaticSomeone Serge2-1/+30
2024-07-21lib: reflect effective signatures of getOutput functionsSomeone Serge1-16/+18
2024-07-21lib: add getOutput', a nix-lang counterpart of _overrideFirstSomeone Serge2-3/+74
2024-07-19stdenv/freebsd: reinitAudrey Dutcher1-2/+1
The old stdenv didn't work, and was also impure. The new one works, and is pure. Presently, the bootstrap tools are cross compiled into one small nar and one large tar, which is then unpacked, patched, and split into smaller derivations. Efforts were made to make the boot process as short as possible - there are only two clangs built, and as many packages are propagated between stages as possible while leaving the bootstrap tools out of the final stdenv's closure.
2024-07-19lib/deprecated: alias mapAttrsFlatten to mapAttrsToListIvan Trubach1-2/+3
These functions have identical implementation except for argument names.
2024-07-18Merge pull request #323143 from tsandrini/init-mqtt-explorerNikolay Korotkiy1-0/+6
mqtt-explorer: init at 0.4.0-beta.6
2024-07-18lib/licenses: add cc-by-nd-40tsandrini1-0/+6