about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2024-02-02Merge pull request #285301 from ibbem/gitTracked-shallowSilvan Mosberger2-1/+31
lib.fileset.gitTracked: Allow clones of shallow repositories
2024-02-01lib.fileset.gitTracked: Allow clones of shallow repositoriesibbem2-1/+31
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>
2024-01-30Merge pull request #284829 from deemp/masterRobert Hensing3-0/+9
types.nix: fix nonEmptyListOf
2024-01-30feat: add test for nonEmptyListOf submoduleDanila Danko2-0/+8
2024-01-29types.nix: fix nonEmptyListOfDanila Danko1-0/+1
2024-01-29lib/trivial: bump oldestSupportedRelease to 23.11figsoda1-1/+1
2024-01-27licenses: add Creative Commons Attribution 2.0Vincenzo Mantova1-0/+5
2024-01-18lib.system.inspect: add wasm32 to isILP32Adam Joseph1-1/+2
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
2024-01-12Merge pull request #248220 from infinisil/document-extendsSilvan Mosberger1-23/+136
Improve the documentation of `lib.extends` and how it relates to overlays
2024-01-08Merge pull request #278777 from tweag/fix-evalsSilvan Mosberger1-1/+5
`lib.callPackageWith`: Use abort again instead of throw and fix evaluation errors caused by it
2024-01-07lib.callPackageWith: Use abort, not throwSilvan Mosberger1-1/+5
This reverts f8ea911f7c4e44b167d4b1b51f6d00ebd93e1ed1, see also https://github.com/NixOS/nixpkgs/pull/271123#discussion_r1442134594
2024-01-02lib/systems: add exec format inspection attrsRyan Burns1-0/+3
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.
2023-12-30Merge pull request #276271 from ↵Robert Hensing2-3/+31
hercules-ci/modules-types-description-nonRestrictiveClause lib.types: Improve descriptions of composed types that have commas
2023-12-26lib/licenses: add missing spdxidsjopejoe11-1/+8
2023-12-23lib.types: Improve descriptions of composed types that have commasRobert Hensing2-3/+31
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)
2023-12-19Merge pull request #272083 from tweag/lib-contribSilvan Mosberger1-0/+63
lib: Add contribution guidelines
2023-12-19Merge pull request #273893 from tweag/fileset.gitTracked-storeDirSilvan Mosberger3-57/+125
`lib.fileset.gitTracked`: Support out-of-tree builds
2023-12-19Remove --simulate-pure-evalSilvan Mosberger1-36/+18
2023-12-19lib.fileset.gitTracked: Support out-of-tree buildsSilvan Mosberger3-6/+86
2023-12-19Merge pull request #270537 from 9999years/packagesFromDirectorySilvan Mosberger14-1/+205
lib.packagesFromDirectoryRecursive: init
2023-12-19lib.packagesFromDirectoryRecursive: initRebecca Turner14-1/+205
Co-authored-by: Gabriella Gonzalez <GenuineGabriella@gmail.com>
2023-12-19lib: `modules.sh` should check JSON output for predictabilityRebecca Turner4-17/+24
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.
2023-12-19lib.fileset.fetchGit: RefactoringSilvan Mosberger1-18/+24
2023-12-15lib.generators: made toLua accept derivations tooMatthieu Coudron1-0/+2
While trying to extend generateLuarocksConfig, I had infinite loops caused by toLua considering derivations as attrSets
2023-12-15lib/tests/release.nix: temporary reference to pkgs/test/releaseAdam Joseph1-1/+13
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.
2023-12-15treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobsAdam Joseph1-0/+1
2023-12-13Merge pull request #269551 from tejing1/nixos-stub-ldRobert Hensing1-0/+7
nixos/stub-ld: init module
2023-12-13Merge pull request #273704 from adisbladis/lib-getexe-efficiencySilvan Mosberger1-19/+15
lib.getExe: Make more efficient
2023-12-13Merge pull request #274022 from hercules-ci/doc-attrsets-operatorsSilvan Mosberger1-0/+24
lib/attrsets: Document and link Nix language operators
2023-12-13lib/attrsets: Document and link Nix language operatorsRobert Hensing1-0/+24
2023-12-13lib.path.hasStorePathPrefix: initSilvan Mosberger2-1/+110
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-12-13Merge pull request #273664 from tweag/fileset.gitTracked-improvementsSilvan Mosberger3-41/+56
`lib.fileset.gitTracked,gitTrackedWith`: Minor improvements
2023-12-12lib.getExe: Make more efficientadisbladis1-19/+15
2023-12-11lib.fileset.gitTracked: Improve error when passing filesSilvan Mosberger2-0/+8
2023-12-11lib.fileset: Refactor gitTracked and gitTrackedWithSilvan Mosberger2-41/+48
Introduce an internal function for them to share more behavior. This makes future changes easier.
2023-12-11Merge pull request #273473 from adisbladis/lib-isConvertibleToString-static-listSilvan Mosberger1-2/+4
lib.isConvertibleToString: Statically compute types list
2023-12-11Merge pull request #273470 from adisbladis/lib-tohexstring-static-valuesSilvan Mosberger1-16/+14
lib.toHexString: Statically compute hexDigits attrset
2023-12-11Merge pull request #273474 from adisbladis/lib-cmakeOptionType-static-listSilvan Mosberger1-6/+7
lib.cmakeOptionType: Statically compute types list
2023-12-11Merge pull request #273467 from adisbladis/lib-pipe-no-letSilvan Mosberger1-3/+1
lib.pipe: Avoid creating a scope
2023-12-11Merge pull request #273004 from hercules-ci/attrset-path-longest-prefixRobert Hensing2-0/+117
lib.attrsets.longestValidPathPrefix: init
2023-12-11Merge pull request #257100 from Ma27/version-info-libRobert Hensing3-3/+40
flake: fix `lib.trivial.version` when used from a flake
2023-12-11lib.cmakeOptionType: Statically compute types listadisbladis1-6/+7
2023-12-11lib.isConvertibleToString: Statically compute types listadisbladis1-2/+4
2023-12-11lib.toHexString: Statically compute hexDigits attrsetadisbladis1-16/+14
2023-12-11lib.pipe: Avoid creating scopesadisbladis1-3/+1
2023-12-11lib.strings: Dont create scopes for getName/getVersionadisbladis1-12/+12
We can create the `parse` function in a scope one level up to avoid recomputing it every time.
2023-12-10Merge pull request #272709 from hercules-ci/module-system-test-pr-131205Maximilian Bosch4-0/+36
lib/modules: Test optionless module errors from #131205
2023-12-10flake/version overlay: review fixesMaximilian Bosch3-19/+22
* Improves the comments of `lib/flake-version-info.nix` and drops the `__`-prefix from the filename. * `lib'` -> `lib0` in `nixpkgs/lib`. * Drop the declaration of `trivial.version` in the overlay because this declaration already uses the final expressions of `versionSuffix` and `release` now. * No need to fall back to `self.lastModified` anymore, this was a workaround for pre2.4 Nix. Co-authored-by: Robert Hensing <robert@roberthensing.nl> Co-authored-by: Silvan Mosberger <contact@infinisil.com>
2023-12-10lib/trivial: drop `rec` in favor of `lib` fixpointMaximilian Bosch1-2/+14
That way each expression uses the final version of other lib.trivial declarations. For instance, when replacing `versionSuffix` with the string `"fnord"` in a lib overlay, `trivial.version` uses `"fnord"` as suffix now rather than `pre-git`.
2023-12-10Merge pull request #272183 from infinisil/nixpkgs-referenceRobert Hensing1-1/+1
doc: Rename to Nixpkgs reference manual and restate purpose