about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-01-31Merge pull request #205557 from ncfavier/concatLinesSilvan Mosberger3-1/+17
lib/strings: add `concatLines`
2023-01-31Merge pull request #213650 from urandom2/libdocSilvan Mosberger3-10/+10
lib: standardise attrset type syntax
2023-01-31Merge master into staging-nextgithub-actions[bot]2-6/+15
2023-01-30lib: standardise attrset type syntaxColin Arnott3-10/+10
There are a number of different syntaxes used for attrset type signatures in our doc strings, this change standardises upon one that uses :: for specifying attribute type, and ; terminators to be consistent with nix syntax. There are no bugs in the functions themselves, just that different syntaxes may confuse new users.
2023-01-30Merge pull request #212939 from amjoseph-nixpkgs/pr/isStaticFlorian Klink2-6/+15
meta: replace predicates with pattern over elaborated platform
2023-01-30lib.systems.inspect.patterns.isEfi: drop ARMv5Alyssa Ross1-2/+7
I'm not aware of any ARMv5 EFI implementation. gnu-efi doesn't support it, so the build of systemd for armv5tel-linux is broken if it's isEfi.
2023-01-30Merge pull request #212282 from hercules-ci/pkg-config-packagesRobert Hensing1-1/+2
defaultPkgConfigPackages: init
2023-01-30lib.hydraJob: Tolerate nullRobert Hensing1-1/+2
By allowing null, we allow code to avoid filterAttrs, improving laziness in real world use cases. Specifically, this strategy prevents infinite recursion errors, performance issues and possibly other errors that are unrelated to the user's code.
2023-01-29lib.systems.inspect.patterns.isEfi: remove "aarch64"Alyssa Ross1-1/+1
There is no "aarch64" CPU family — it counts as "arm", as can be seen from the definition of isAarch64 above. Checked that stdenv.hostPlatform.isEfi is still true on aarch64-linux.
2023-01-27maintainers: clarify what fields are requiredNaïm Favier1-0/+1
2023-01-27maintainers: disallow `noreply.github.com` emailsNaïm Favier1-0/+2
2023-01-27maintainers: make `email` optionalNaïm Favier2-3/+6
Not giving an email address is fine as long as the maintainer is reachable through other means, such as GitHub or Matrix.
2023-01-27Update lib/systems/inspect.nixAdam Joseph1-2/+2
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27Update lib/systems/inspect.nixAdam Joseph1-1/+1
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27Update lib/meta.nixAdam Joseph1-1/+1
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27Update lib/meta.nixAdam Joseph1-1/+1
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-27lib/systems/inspect.nix: add platformPatterns.isStaticAdam Joseph1-0/+10
2023-01-27lib/meta.nix: allow patterns over entire platform, not just `.parsed`Adam Joseph1-1/+5
2023-01-27Revert "lib/meta.nix: platformMatch: allow predicate functions"Adam Joseph1-6/+1
This reverts commit b7d097438b9b0f782a707f3295d320d824810864.
2023-01-25Merge pull request #212189 from ↵Robert Hensing1-2/+7
amjoseph-nixpkgs/pr/lib/mapAttrsRecursive/comment attrsets: clarify that mapAttrs maps over *leaf* attrs
2023-01-25Update lib/attrsets.nixAdam Joseph1-1/+4
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-01-24Merge pull request #212408 from raboof/imapsync-fix-licensePascal Wittmann1-1/+6
imapsync: fix license
2023-01-24licenses: add NLPLArnout Engelen1-1/+6
2023-01-23Merge pull request #209769 from LoveIsGrief/simple-dlna-browserSandro1-0/+6
2023-01-22attrsets: clarify that mapAttrs maps over *leaf* attrsAdam Joseph1-2/+4
2023-01-22lib/meta.nix: platformMatch: allow predicate functionsAdam Joseph1-1/+6
2023-01-20Merge pull request #210976 from clhodapp/fix/extensible-setsRobert Hensing1-2/+2
lib: make extender available on self-references
2023-01-19Merge pull request #211622 from alyssais/valgrind-platformsJohn Ericson3-0/+10
valgrind: make meta.platforms more accurate
2023-01-19lib.platforms.s390x: initAlyssa Ross3-0/+3
2023-01-19lib.platforms.power: initAlyssa Ross2-0/+2
2023-01-19lib.platforms.armv7: initAlyssa Ross3-0/+5
2023-01-18lib/tests/release.nix: Make nix a parameter + strictDepsRobert Hensing1-3/+7
This makes bisecting nix a bit easier. Example reproducer, invoked from nix directory: ```bash nix-build ../nixpkgs/lib/tests/release.nix --arg nix '(builtins.getFlake "git+file://${toString ./.}").packages.x86_64-linux.default' ```
2023-01-15lib: make extender available on self-referencesChris Hodapp1-2/+2
2023-01-13Merge pull request #184521 from dramforever/riscv-isefiNick Cao1-1/+1
lib/systems/inspect.nix: Add riscv to isEfi
2023-01-11check-meta(hasUnsupportedPlatform): use lib.meta.availableOnAdam Joseph1-3/+1
`hasUnsupportedPlatform` was not updated with #37395, so it does not understand attrsets in `meta.[bad]platforms`. In particular, attrsets in `meta.badPlatforms` will "fail open" and be ignored. Let's use `lib.meta.availableOn` instead of duplicating its logic. Thanks to @alyssais for [noticing][1]. [1][https://github.com/NixOS/nixpkgs/pull/194148#discussion_r990817610] Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2023-01-11lib/meta(availableOn): handle missing meta and empty meta.platformAdam Joseph1-2/+5
2023-01-10lib/licenses add Fair licenseLoveIsGrief1-0/+6
2023-01-10Merge pull request #209974 from amjoseph-nixpkgs/pr/close/209952Artturi1-4/+8
2023-01-10lib/path/tests: Fix property tests when "-n" is generatedSilvan Mosberger1-1/+1
When "-n" is generated by the property tests, it causes `echo` to not output the string since it's interpreted as an option. Apparently there's no good way to print "-n" with `echo` [1], so switching to `printf` instead [1]: https://unix.stackexchange.com/questions/85846/how-can-i-print-n-with-echo
2023-01-09add mipsisa{32,64}r6[el], closes 209952Adam Joseph1-4/+8
2023-01-08lib/modules: make `mkAliasOptionModule` emit DocBookNaïm Favier1-3/+5
Follow-up to https://github.com/NixOS/nixpkgs/pull/208407 Removing `mdDoc` isn't enough, we need to emit actual DocBook.
2023-01-05Merge pull request #208674 from YoshiRulz/yoshi-lib-docsSilvan Mosberger5-26/+26
lib: Fix mismatched quotes in `lib.*` doc comments
2023-01-05lib/modules: hide _module.args docspennae1-0/+5
unfortunately we can't unconditionally make this text markdown without impacting downstream users of docs generation (as noted in #175586). hide it entirely until the transition is complete.
2023-01-05modules: add mkPackageOptionMDpennae2-2/+7
another transitional option factory, like mkAliasOptionModuleMD.
2023-01-05modules: add mkAliasOptionModuleMDpennae2-3/+13
mkAliasOptionModule should not default to mdDoc descriptions because that can break out-of-tree users of documentation infrastructure. add an explicitly-MD variant for now, to be removed some time after the MD transition is complete.
2023-01-03Merge pull request #205190 from NixOS/lib.path.relativeNormaliseRobert Hensing9-1/+881
lib.path.subpath.{isValid,normalise}: init
2023-01-03lib.path.subpath.normalise: add property testsSilvan Mosberger4-0/+310
2023-01-03lib.path.subpath.normalise: initSilvan Mosberger2-0/+192
2023-01-03lib.path.subpath.isValid: initSilvan Mosberger5-1/+183
The first path library function
2023-01-03lib.path: init README.md documentSilvan Mosberger1-0/+196
Adds initial work towards a `lib.path` library Originally proposed in https://github.com/NixOS/nixpkgs/pull/200718, but has since gone through some revisions Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io> Co-Authored-By: Robert Hensing <robert@roberthensing.nl>