summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Expand)AuthorAgeFilesLines
* treewide: remove licenses.agpl3Jussi Kuokkanen2024-03-211-5/+0
* lib/license: add hpndUcjopejoe12024-03-201-0/+5
* lib/license: add giftwarejopejoe12024-03-201-0/+5
* lib/license: add NIST-Softwarejopejoe12024-03-201-0/+5
* doc: migrate lib.trivial to use doc-comments (#297270)•••* doc: migrate lib.trivial to use doc-comments * Apply suggestions from code review --------- Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>Johannes Kirschbauer2024-03-191-213/+726
* Merge pull request #296186 from hsjobeki/doc/attrsets•••doc: migrate lib.attrsets to use doc-commentsDaniel Sidhion2024-03-191-516/+1308
|\
| * Apply suggestions from code reviewDaniel Sidhion2024-03-191-0/+56
| * doc: manual fixup after migrationJohannes Kirschbauer2024-03-191-71/+12
| * doc: migrate lib.attrsets to use doc-commentsJohannes Kirschbauer2024-03-151-447/+1242
* | Merge pull request #293901 from philiptaron/refactor-lib/generators.nix•••lib: use explicit name imports in `lib/generators.nix`Silvan Mosberger2024-03-181-75/+132
|\ \
| * | lib: use names from `lib` in `lib/generators.nix`, rather than `builtins` or ...•••There's not a lot of rhyme to which names are exported from which module, as I see it, but everything is found somewhere. Philip Taron2024-03-161-36/+24
| * | lib/generators: use the explicit public interface pattern•••This enables further refactoring without accidentally changing the public interface. Philip Taron2024-03-141-19/+37
| * | lib/generators: explicitly import names from `lib.trivial`•••Everything else was already imported. Philip Taron2024-03-141-1/+5
| * | lib/generators: explicitly import names from `lib.attrsets`•••Everything used was already imported. Philip Taron2024-03-141-7/+5
| * | lib/generators: explicitly import names from `lib.string`•••A couple of these were imports from `builtins`. Philip Taron2024-03-141-15/+24
| * | lib/generators: explicitly import names from `lib`•••I followed the `inherit` chains in `lib/default.nix` to arrive at these imports. Philip Taron2024-03-141-18/+41
| * | lib/generators: builtins.isFloat is in Nix 2.3•••There's a couple of aliases in play: 1. `lib.isList` is an alias for `builtins.isList`. 2. `lib.strings.concatStringsSep` is an alias for `builtins.concatStringsSep` Philip Taron2024-03-141-22/+39
* | | Merge pull request #295158 from philiptaron/remove-top-level-with-in-lib-part5•••Avoid top-level `with` in `lib/tests/misc.nix`Silvan Mosberger2024-03-181-1/+88
|\ \ \
| * | | Avoid top-level `with` in lib/tests/misc.nixPhilip Taron2024-03-111-1/+88
* | | | lib.foldl': document eta expansionJohannes Kirschbauer2024-03-161-1/+9
* | | | lib.foldl': avoid unnecessary function callJohannes Kirschbauer2024-03-151-3/+1
| |_|/ |/| |
* | | 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