summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #294906 from philiptaron/remove-top-level-with-in-lib-part2•••lib: use explicit name imports in `lib/deprecated.nix`Silvan Mosberger2024-03-141-18/+84
|\
| * lib: use explicit name imports in lib/deprecated.nixPhilip Taron2024-03-101-18/+84
* | Merge pull request #295007 from philiptaron/remove-top-level-with-in-lib-part3•••lib: avoid top-level `with ...;` in lib/kernel.nixSilvan Mosberger2024-03-141-1/+3
|\ \
| * | Avoid top-level `with ...;` in lib/kernel.nixPhilip Taron2024-03-111-1/+3
| |/
* | doc: lib.lists migrate to doc-comments (#294257)•••* doc: lib.lists migrate to doc-comments * Fix extra indentation of docs lines, remove redundant comments, add inputs docs * fix: indentation & argument references --------- Co-authored-by: DS <commits@sidhion.com>Johannes Kirschbauer2024-03-131-370/+1322
* | Avoid top-level `with ...;` in lib/tests/modules/extendModules-168767-imports...Philip Taron2024-03-111-1/+8
* | Avoid top-level `with ...;` in lib/tests/modules/alias-with-priority.nixPhilip Taron2024-03-111-3/+10
* | Avoid top-level `with ...;` in lib/tests/modules/alias-with-priority-can-over...Philip Taron2024-03-111-3/+10
|/
* doc: actually document `lib.customisation.makeScope` (#294194)•••* doc: actually document `lib.customisation.makeScope`Valentin Gagarin2024-03-091-11/+122
* doc: lib.asserts migrate to doc-comments (#292310)Johannes Kirschbauer2024-03-071-42/+104
* Merge branch 'master' into license-updatesJörg Thalheim2024-03-0632-333/+912
|\
| * Merge pull request #292945 from adisbladis/lib-toint•••lib.toInt/toIntBase10: Make more efficient by hoisting up internal strings into higher scopeSilvan Mosberger2024-03-061-10/+17
| |\
| | * lib.toInt/toIntBase10: Make more efficient by hoisting up internal strings in...adisbladis2024-03-031-10/+17
| * | Merge pull request #292941 from adisbladis/lib-getattrfrompath-env•••lib.getAttrFromPath: Don't use errorMessage variableSilvan Mosberger2024-03-061-2/+1
| |\ \
| | * | lib.getAttrFromPath: Don't use errorMessage variable•••We can just pass the error message on without creating an environment. adisbladis2024-03-031-2/+1
| | |/
| * | Merge pull request #292938 from adisbladis/mapattrsrecursivecond-env•••lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable environmentSilvan Mosberger2024-03-061-7/+6
| |\ \
| | * | lib.mapAttrsRecursiveCond: Eliminate intermediate one intermediate variable e...adisbladis2024-03-031-7/+6
| | |/
| * | Merge pull request #292937 from adisbladis/zipattrs-env•••lib.zipAttrs: Remove needless function wrappingSilvan Mosberger2024-03-061-4/+1
| |\ \
| | * | lib.zipAttrs: Remove needless function wrapping•••Returning the partially applied `zipAttrsWith fn` is the same as `sets: zipAttrsWith fn sets`. adisbladis2024-03-031-4/+1
| | |/
| * | Merge pull request #292934 from adisbladis/lib-choosedevoutput•••lib.chooseDevOutputs: Remove needless function wrappingSilvan Mosberger2024-03-061-4/+1
| |\ \
| | * | lib.chooseDevOutputs: Remove needless function wrapping•••Returning the partially applied `map getDev` is the same as `drvs: map getDev drvs`. adisbladis2024-03-031-4/+1
| | |/
| * | Merge pull request #292209 from hercules-ci/lazyDerivation-multi-output•••lib.lazyDerivation: Support multi-output derivationsSilvan Mosberger2024-03-062-7/+75
| |\ \
| | * | lib.lazyDerivation: Support multi-output derivationsRobert Hensing2024-02-292-7/+75
| * | | doc: add details on `mapAttrsRecursive[Cond]` (#293509)•••* doc: add details on `mapAttrsRecursive[Cond]` from first reading it wasn't clear that `f` also takes the current attribute path. also the value f receives is tricky due to how the condition is evaluated. Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>Valentin Gagarin2024-03-061-31/+46
| * | | Merge pull request #177977 from thefloweringash/call-packages-with-function-args•••lib/customization: propagate function arguments in callPackagesWithArtturi2024-03-032-1/+20
| |\ \ \
| | * | | lib/customization: propagate function arguments in callPackagesWith•••makeOverridable is very careful to ensure the arguments to the overridden function are the same as the input function. As a result, the arguments of hello.override are exactly the same as the original arguments of the hello function that produced the derivation. However, callPackagesWith calls makeOverridable with a lambda that does not propagate the arguments. The override function for a package instantiated with callPackagesWith will not have the original arguments. For example: nix-repl> lib.functionArgs hello.override { callPackage = false; fetchurl = false; hello = false; lib = false; nixos = false; stdenv = false; testers = false; } nix-repl> lib.functionArgs openssl.override { } By copying the arguments onto the inner lambda before passing it to makeOverridable, we can make callPackage and callPackages behave the same. nix-repl> lib.functionArgs openssl.override { buildPackages = false; coreutils = false; cryptodev = false; enableSSL2 = true; enableSSL3 = true; fetchurl = false; lib = false; perl = false; removeReferencesTo = false; static = true; stdenv = false; withCryptodev = true; withPerl = true; } Andrew Childs2024-02-282-1/+20
| * | | | Merge pull request #288812 from hercules-ci/lib-flake-version•••`lib/` flake: fix `lib.version`Robert Hensing2024-03-033-1/+8
| |\ \ \ \ | | |_|_|/ | |/| | |
| | * | | lib/tests/release: Test lib.version in isolationRobert Hensing2024-02-261-0/+6
| | * | | .version: Make lib/.version source of truth•••This way we don't have to make sure they're in sync, and we remove a small step from the release process. Robert Hensing2024-02-261-9/+0
| | * | | lib flake: Fix version•••Manually tested with nix-repl> :lf path:lib nix-repl> lib.version Robert Hensing2024-02-263-1/+11
| * | | | Merge pull request #292340 from DanielSidhion/fix-fixed-points-doc•••lib.fixedPoints: fix rendering of docs for `extends`Silvan Mosberger2024-02-291-7/+6
| |\ \ \ \ | | |_|_|/ | |/| | |
| | * | | lib.fixedPoints: fix rendering of docs for `extends`DS2024-02-291-7/+6
| | | |/ | | |/|
| * | | Merge pull request #287369 from tweag/lib-remove-polyfills•••`lib`: Remove unneeded polyfillsSilvan Mosberger2024-02-286-94/+15
| |\ \ \ | | |/ / | |/| |
| | * | lib.versions: Remove unneeded polyfill•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around. Silvan Mosberger2024-02-091-1/+1
| | * | lib.strings: Remove unneeded polyfill•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around. Silvan Mosberger2024-02-091-2/+1
| | * | lib.lists: Remove unneeded polyfills•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around. Silvan Mosberger2024-02-091-26/+5
| | * | lib.attrsets: Remove unneeded polyfills•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around. Silvan Mosberger2024-02-091-9/+6
| | * | lib.trivial: Remove unneeded polyfills•••Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around. Silvan Mosberger2024-02-092-56/+2
| * | | Merge pull request #291933 from tweag/fileset-tests-posix•••lib.fileset: Fix tests on Darwin, more POSIXRobert Hensing2024-02-281-48/+52
| |\ \ \
| | * | | lib.fileset: Fix tests on Darwin, more POSIX•••This was found when trying to run the fileset tests on Darwin (https://github.com/NixOS/nix/pull/9546#issuecomment-1967409445), which mysteriously fail on Darwin: test case at lib/fileset/tests.sh:342 failed: toSource { root = "/nix/store/foobar"; fileset = ./.; } should have errored with this regex pattern: lib.fileset.toSource: `root` \(/nix/store/foobar\) is a string-like value, but it should be a path instead. \s*Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead. but this was the actual error: error: lib.fileset.toSource: `root` (/nix/store/foobar) is a string-like value, but it should be a path instead. Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead. After dissecting this, I find out that apparently \s works on Linux, but not on Darwin for some reason! From the bash source code, it looks like <regex.h> with `REG_EXTENDED` is used for all platforms the same, so there's nothing odd there. It's almost impossible to know where <regex.h> comes from, but it looks to be a POSIX thing. So after digging through the almost impossible to find POSIX specifications (https://pubs.opengroup.org/onlinepubs/007908799/xbd/re.html#tag_007_003_005), I can indeed confirm that there's no mention of \s or the like! _However_, there is a mention of `[[:blank:]]`, so we'll use that instead. Silvan Mosberger2024-02-271-48/+52
| | | |/ | | |/|
| * | | Merge pull request #291909 from cdmistman/lib-meta-available-on-doc-example•••lib.meta.availableOn: add example in documentationRyan Mulligan2024-02-271-0/+4
| |\ \ \
| | * | | lib.meta.availableOn: add example in documentationColton Donnelly2024-02-271-0/+4
| | |/ /
| * / / lib.meta.platformMatch: expand documentationColton Donnelly2024-02-271-0/+4
| |/ /
| * | Merge pull request #288677 from tweag/fileset.toList•••lib.fileset.toList: initSilvan Mosberger2024-02-263-2/+82
| |\ \
| | * | lib.fileset.toList: initSilvan Mosberger2024-02-263-2/+82
| * | | Merge pull request #291583 from SuperSandro2000/mergeAttrsList•••lib: export attrsets.mergeAttrsListSilvan Mosberger2024-02-261-2/+2
| |\ \ \
| | * | | lib: export attrsets.mergeAttrsListSandro2024-02-261-2/+2
| * | | | lib/tests/test-with-nix.nix: init•••See https://github.com/NixOS/nix/pull/9900 Robert Hensing2024-02-232-54/+71
| |/ / /
| * | | Merge pull request #286544 from hercules-ci/doRename-doc•••lib.modules.doRename: Add doc commentsValentin Gagarin2024-02-221-1/+72
| |\ \ \
| | * | | lib.modules.doRename: Add doc comments•••I don't think these are rendered yet, but this at least provides the content. Follow-up to https://github.com/NixOS/nixpkgs/pull/285612 Robert Hensing2024-02-141-1/+72