summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #284512 from hercules-ci/lib-types-unique-merge•••lib.types.unique: Check inner type deeplySilvan Mosberger2024-02-104-18/+62
|\
| * lib.option.mergeUniqueOption: Simplify and add warning about merge function•••The previous code was optimized for the old uniq behavior, which did not call merge. That's changed, so the legacy path is not a hot path anymore, and is not worth any tech debt. Robert Hensing2024-02-041-16/+11
| * lib.types.uniq: Check inner type•••We now reuse the `unique` type, which implements this. Keeping the duplication around would be bad at this point. Robert Hensing2024-02-041-12/+1
| * lib.types.unique: Check inner type deeply•••This doesn't change uniq. Why not? - In NixOS it seems that uniq is only used with simple types that are fully checked by t.check. - It exists for much longer and is used more widely. - I believe we should deprecate it, because unique was already better. - unique can be a proving ground. Robert Hensing2024-01-284-6/+66
* | Merge pull request #287124 from RaitoBezarius/is-sparc-64•••lib/systems/inspect: add `isSparc64`Ryan Lahfa2024-02-091-0/+1
|\ \
| * | lib/systems/inspect: add `isSparc64`•••This is useful to distinguish between SPARC64 and SPARC whatever, because SPARC64 do support compressed kernels. Raito Bezarius2024-02-081-0/+1
* | | Merge pull request #286117 from alois31/lib-deprecations•••lib: make deprecation warnings consistentSilvan Mosberger2024-02-095-11/+12
|\ \ \ | |/ / |/| |
| * | lib: make deprecation warnings consistent•••The deprecation warnings in lib were wildly inconsistent. Different formulations were used in different places for the same meaning. Some warnings used builtins.trace instead of lib.warn, which prevents silencing; one even only had a comment instead. Make everything more uniform. Alois Wohlschlager2024-02-035-11/+12
* | | Merge pull request #285612 from hercules-ci/doRename-condition•••lib.modules.doRename: Add condition parameterRobert Hensing2024-02-056-3/+77
|\ \ \
| * | | lib.modules.doRename: Add condition parameter•••This is to support single-to-multi service migrations, so that the `to` (e.g. `foos.""`) isn't defined unconditionally. See test cases. Robert Hensing2024-02-026-3/+77
| |/ /
* | | Merge pull request #285353 from sternenseemann/nix-2.3-syntax•••treewide: fix parse errors with Nix 2.3 and related problemsSilvan Mosberger2024-02-052-0/+2
|\ \ \
| * | | lib/tests/packages-from-directory: make sure all .nix files parse•••It is useful that all (or almost all) .nix files in nixpkgs at least parse since it allows for checking syntax in the repository programmatically without evaluating anything. sternenseemann2024-01-312-0/+2
| |/ /
* | | Merge branch 'optionalDrvAttr'Shea Levy2024-02-023-2/+46
|\ \ \
| * | | lib: Add optionalDrvAttr to conditionally set drv attributes.•••This allows for adding new, conditionally set, derivation attributes to an existing derivation without changing any output paths in the case where the condition is not met. Shea Levy2024-02-023-2/+46
| |/ /
* | | Merge pull request #285301 from ibbem/gitTracked-shallow•••lib.fileset.gitTracked: Allow clones of shallow repositoriesSilvan Mosberger2024-02-022-1/+31
|\ \ \ | |/ / |/| |
| * | lib.fileset.gitTracked: Allow clones of shallow repositories•••The only reason shallow clones are not the default in `builtins.fetchGit` is that `revCount` can't be provided when cloning a shallow repository. However, `revCount` isn't used or exposed by `lib.fileset`. Hence, allowing cloning shallow repositories makes `gitTracked` more general without any drawbacks. Co-authored-by: Silvan Mosberger <github@infinisil.com> ibbem2024-02-012-1/+31
* | | Merge pull request #284829 from deemp/master•••types.nix: fix nonEmptyListOfRobert Hensing2024-01-303-0/+9
|\ \ \ | |/ / |/| |
| * | feat: add test for nonEmptyListOf submoduleDanila Danko2024-01-302-0/+8
| * | types.nix: fix nonEmptyListOfDanila Danko2024-01-291-0/+1
* | | lib/trivial: bump oldestSupportedRelease to 23.11figsoda2024-01-291-1/+1
|/ /
* / licenses: add Creative Commons Attribution 2.0Vincenzo Mantova2024-01-271-0/+5
|/
* lib.system.inspect: add wasm32 to isILP32•••According to the WebAssembly design doc, wasm32 is an ILP32 ABI like x32, mips64n32, and aarch64_ilp32 (Apple Watch). This commits adds it to the predicate. https://github.com/WebAssembly/design/blob/1319968ca53fb5c7e7ea6cc210c7b0ed46566a45/CAndC%2B%2B.md?plain=1#L16 Adam Joseph2024-01-181-1/+2
* Merge pull request #248220 from infinisil/document-extends•••Improve the documentation of `lib.extends` and how it relates to overlaysSilvan Mosberger2024-01-121-23/+136
|\
| * lib.fixedPoints.extends: Doc improvements•••Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io> Silvan Mosberger2023-09-281-12/+71
| * lib.fixedPoints.extends: Refactor implementation and document arguments•••- Better names: - self -> final - super -> prev - rattrs -> f - f -> overlay - Add documentation to the function arguments - Add some spacing Silvan Mosberger2023-08-101-1/+14
| * lib.fixedPoints.extends: Add type and examplesSilvan Mosberger2023-08-101-0/+20
| * lib.fixedPoints.extends: Improve documentation•••The previous one was unnecessarily confusing. Silvan Mosberger2023-08-101-23/+44
* | Merge pull request #278777 from tweag/fix-evals•••`lib.callPackageWith`: Use abort again instead of throw and fix evaluation errors caused by itSilvan Mosberger2024-01-081-1/+5
|\ \
| * | lib.callPackageWith: Use abort, not throw•••This reverts f8ea911f7c4e44b167d4b1b51f6d00ebd93e1ed1, see also https://github.com/NixOS/nixpkgs/pull/271123#discussion_r1442134594 Silvan Mosberger2024-01-071-1/+5
* | | lib/systems: add exec format inspection attrs•••Most of the time when we do a patchelf conditional on hostPlatform.isLinux, what we really mean is hostPlatform.isElf. Now that we are starting to support BSDs, this is becoming more important. Ryan Burns2024-01-021-0/+3
|/ /
* | Merge pull request #276271 from hercules-ci/modules-types-description-nonRest...•••lib.types: Improve descriptions of composed types that have commasRobert Hensing2023-12-302-3/+31
|\ \
| * | lib.types: Improve descriptions of composed types that have commas•••Type: either ints.positive (enum ["auto"]) Before: positive integer, meaning >0 or value "auto" (singular enum) After: positive integer, meaning >0, or value "auto" (singular enum) Robert Hensing2023-12-232-3/+31
* | | lib/licenses: add missing spdxidsjopejoe12023-12-261-1/+8
|/ /
* | Merge pull request #272083 from tweag/lib-contrib•••lib: Add contribution guidelinesSilvan Mosberger2023-12-191-0/+63
|\ \
| * | lib: Add contribution guidelines•••Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Silvan Mosberger2023-12-051-0/+63
* | | Merge pull request #273893 from tweag/fileset.gitTracked-storeDir•••`lib.fileset.gitTracked`: Support out-of-tree buildsSilvan Mosberger2023-12-193-57/+125
|\ \ \
| * | | Remove --simulate-pure-evalSilvan Mosberger2023-12-191-36/+18
| * | | lib.fileset.gitTracked: Support out-of-tree buildsSilvan Mosberger2023-12-193-6/+86
| * | | lib.fileset.fetchGit: RefactoringSilvan Mosberger2023-12-191-18/+24
* | | | Merge pull request #270537 from 9999years/packagesFromDirectory•••lib.packagesFromDirectoryRecursive: initSilvan Mosberger2023-12-1914-1/+205
|\ \ \ \
| * | | | lib.packagesFromDirectoryRecursive: init•••Co-authored-by: Gabriella Gonzalez <GenuineGabriella@gmail.com> Rebecca Turner2023-12-1914-1/+205
| | |/ / | |/| |
* | | | lib: `modules.sh` should check JSON output for predictability•••Currently, the `lib/tests/modules.sh` test checks the output of `nix-instantiate --eval` without `--json`, which outputs an unspecified human-readable format. This patch modifies `modules.sh` to use the `--json` output instead, to be robust against future changes to `nix-instantiate` output. Rebecca Turner2023-12-194-17/+24
* | | | lib.generators: made toLua accept derivations too•••While trying to extend generateLuarocksConfig, I had infinite loops caused by toLua considering derivations as attrSets Matthieu Coudron2023-12-151-0/+2
* | | | lib/tests/release.nix: temporary reference to pkgs/test/release•••This commit temporarily adds pkgs/test/release to the lib/tests/release.nix test suite, because ofborg already knows about that entry point. We should move the list of test entry points out of ofborg and into a central place in nixpkgs: https://github.com/NixOS/nixpkgs/issues/272591 Once we do that we won't need to have this ugly kludge in an inappropriate place. Adam Joseph2023-12-151-1/+13
* | | | treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobsAdam Joseph2023-12-151-0/+1
* | | | Merge pull request #269551 from tejing1/nixos-stub-ld•••nixos/stub-ld: init moduleRobert Hensing2023-12-131-0/+7
|\ \ \ \
| * | | | lib.systems.elaborate: add libDir attributeJeff Huffman2023-12-031-0/+7
| |/ / /
* | | | Merge pull request #273704 from adisbladis/lib-getexe-efficiency•••lib.getExe: Make more efficientSilvan Mosberger2023-12-131-19/+15
|\ \ \ \
| * | | | lib.getExe: Make more efficientadisbladis2023-12-121-19/+15
* | | | | Merge pull request #274022 from hercules-ci/doc-attrsets-operators•••lib/attrsets: Document and link Nix language operatorsSilvan Mosberger2023-12-131-0/+24
|\ \ \ \ \ | |_|_|/ / |/| | | |