summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* 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
|\ \ \ \ | |_|_|/ |/| | |
| * | | lib/attrsets: Document and link Nix language operatorsRobert Hensing2023-12-131-0/+24
* | | | lib.path.hasStorePathPrefix: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-12-132-1/+110
* | | | Merge pull request #273664 from tweag/fileset.gitTracked-improvements•••`lib.fileset.gitTracked,gitTrackedWith`: Minor improvementsSilvan Mosberger2023-12-133-41/+56
|\ \ \ \ | |_|/ / |/| | |
| * | | lib.fileset.gitTracked: Improve error when passing filesSilvan Mosberger2023-12-112-0/+8
| * | | lib.fileset: Refactor gitTracked and gitTrackedWith•••Introduce an internal function for them to share more behavior. This makes future changes easier. Silvan Mosberger2023-12-112-41/+48
| | |/ | |/|
* | | Merge pull request #273473 from adisbladis/lib-isConvertibleToString-static-list•••lib.isConvertibleToString: Statically compute types listSilvan Mosberger2023-12-111-2/+4
|\ \ \
| * | | lib.isConvertibleToString: Statically compute types listadisbladis2023-12-111-2/+4
* | | | Merge pull request #273470 from adisbladis/lib-tohexstring-static-values•••lib.toHexString: Statically compute hexDigits attrsetSilvan Mosberger2023-12-111-16/+14
|\ \ \ \
| * | | | lib.toHexString: Statically compute hexDigits attrsetadisbladis2023-12-111-16/+14
| |/ / /
* | | | Merge pull request #273474 from adisbladis/lib-cmakeOptionType-static-list•••lib.cmakeOptionType: Statically compute types listSilvan Mosberger2023-12-111-6/+7
|\ \ \ \
| * | | | lib.cmakeOptionType: Statically compute types listadisbladis2023-12-111-6/+7
| |/ / /
* | | | Merge pull request #273467 from adisbladis/lib-pipe-no-let•••lib.pipe: Avoid creating a scopeSilvan Mosberger2023-12-111-3/+1
|\ \ \ \
| * | | | lib.pipe: Avoid creating scopesadisbladis2023-12-111-3/+1
| |/ / /
* | | | Merge pull request #273004 from hercules-ci/attrset-path-longest-prefix•••lib.attrsets.longestValidPathPrefix: initRobert Hensing2023-12-112-0/+117
|\ \ \ \ | | |_|/ | |/| |
| * | | lib.attrsets.hasAttrByPath: Document law and laziness, and test itRobert Hensing2023-12-082-0/+12
| * | | lib.attrsets.longestValidPathPrefix: init•••Allows finding the most specific path that exists. This is useful for error messages relating to attribute paths. Robert Hensing2023-12-082-0/+105
* | | | Merge pull request #257100 from Ma27/version-info-lib•••flake: fix `lib.trivial.version` when used from a flakeRobert Hensing2023-12-113-3/+40
|\ \ \ \ | |_|/ / |/| | |
| * | | flake/version overlay: review fixes•••* 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> Maximilian Bosch2023-12-103-19/+22
| * | | lib/trivial: drop `rec` in favor of `lib` fixpoint•••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`. Maximilian Bosch2023-12-101-2/+14
| * | | flake: also provide proper version info for lib's flake•••This effectively means that nixpkgs$ nix eval ./lib#lib.trivial.version "23.11.20231020.ee0d6b5" now gives meaningful results as well. See https://github.com/NixOS/nixpkgs/pull/257100#discussion_r1352075369 for the discussion around this. Maximilian Bosch2023-12-092-1/+23
| |/ /
* | | lib.strings: Dont create scopes for getName/getVersion•••We can create the `parse` function in a scope one level up to avoid recomputing it every time. adisbladis2023-12-111-12/+12
* | | Merge pull request #272709 from hercules-ci/module-system-test-pr-131205•••lib/modules: Test optionless module errors from #131205Maximilian Bosch2023-12-104-0/+36
|\ \ \
| * | | lib/modules: Clarify test assertionsRobert Hensing2023-12-091-0/+3
| * | | lib/modules: Test optionless module errors from #131205Robert Hensing2023-12-094-0/+33
| | |/ | |/|
* | | Merge pull request #272183 from infinisil/nixpkgs-reference•••doc: Rename to Nixpkgs reference manual and restate purposeRobert Hensing2023-12-101-1/+1
|\ \ \
| * | | doc: Rename to Nixpkgs reference manual and state purpose•••For the time being, we're moving towards https://nix.dev/ containing all tutorials and guides. The Nixpkgs manual is reinforced to be a _reference_ manual. While it's not just reference for now, that's what the docs team is working towards. This commits rewrites the Nixpkgs manual introduction to reflect that and point to some more useful links. The contribution docs are updated similarly so it's not missed. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-12-081-1/+1
* | | | Merge pull request #272764 from tweag/anyBool•••lib.types.anyBool: initRobert Hensing2023-12-103-0/+36
|\ \ \ \ | |_|_|/ |/| | |