Commit graph

4488 commits

Author SHA1 Message Date
Robert Hensing 90c1822309 nixVersions.nix_2_26: Fix cross and static 2025-03-26 18:33:43 -04:00
nicoo 05d528b56b lib.packagesFromDirectoryRecursive: drop open recursion from API surface 2025-03-26 12:11:44 +01:00
nicoo 151b6e431a lib.packagesFromDirectoryRecursive: document that symlinks are ignored
This was implicit in the previous “other files are ignored.”
2025-03-26 12:11:44 +01:00
nicoo be6ce5f40d lib.packagesFromDirectoryRecursive: Add example use of recurseIntoDirectory 2025-03-26 12:11:44 +01:00
nicoo 93d76b7344 lib.packagesFromDirectoryRecursive: reject unknown arguments
see [discussion](https://github.com/NixOS/nixpkgs/pull/270537#discussion_r1862458435)
2025-03-26 12:11:44 +01:00
nicoo 6cc285d613 lib.packagesFromDirectoryRecursive: hoist processDir out of the lambda
Fixes a bug preventing `recurseIntoDirectory` from changing the `directory` argument.

Moreover, `processDir` now cannot capture arguments from the `packagesFromDirectoryRecursive` call,
entirely preventing this class of bug from reoccurring should new parameters be added etc.
2025-03-26 12:11:44 +01:00
nicoo 32235deeb8 lib.packagesFromDirectoryRecursive: default to creating new scopes when newScope is provided
Co-authored-by: Rebecca Turner <rbt@sent.as>
2025-03-26 12:11:44 +01:00
nicoo 41f219d1d9 lib.packagesFromDirectoryRecursive: add tests for nested scopes 2025-03-26 12:11:43 +01:00
nicoo 6b7576b0cf lib.packagesFromDirectoryRecursive: use explicit recursion, support nested scopes 2025-03-26 12:11:43 +01:00
nicoo fdd2c6f80f lib/tests: move packages-from-directory/* into a subdir
in preparation for adding more tests for `lib.packagesFromDirectoryRecursive`
2025-03-24 18:35:26 +01:00
nicoo 325b3755f5 lib.filesystem: remove dead let-bindings
Found by `deadnix` 🖤
2025-03-24 18:35:25 +01:00
Tristan Ross 05219927d0
lib.systems: mark LLVM libc as static 2025-03-24 06:55:06 -07:00
Ross Smyth 57ec4f3128 lib.systems: Add arm-embedded-nano
Newlib-nano variant of the arm-embedded stdenv.
2025-03-20 16:15:09 -04:00
Johannes Kirschbauer 484a0477d8
lib/types: types.either deprecate functor.wrapped in favor of functor.payload.elemType 2025-03-20 14:11:34 +00:00
Silvan Mosberger 987a096334
lib/types: types deprecate functor.wrapped in favor of functor.payload.elemType for trivial cases (#375084) 2025-03-20 14:28:57 +01:00
Felix Bühler 30358ab7a7
formats.lua: init; types.luaInline: init (#390120) 2025-03-19 23:18:05 +01:00
nikstur 02843300bb lib.licenses.asl20-llvm: replace with separate llvm-exception
This essentially reverts 7ce8e7c4cf

asl20-llvm does not produce a valid SPDX ID, it produces a valid SPDX
Expression. However, this is not what the spdxId field promises.

This is relevant because we cannot produce valid SBOMs (e.g. CycloneDX)
using this field as the schemas for these SBOMs check that the IDs are
valid.

This change leaves us with consistently valid SPDX IDs at the cost
of slightly less convenience.
2025-03-17 13:05:21 +01:00
sanana 8e1e15cf11
lib/licenses: add bsdAxisNoDisclaimerUnmodified
This is a variant composed of clause 1 and 3 of a BSD-Modified found in the
Linux kernel and this extra variant has the words "without modification" added
at the end of clause 1 either with or without a comma. It also lacks the
warranty disclaimer.

See <https://scancode-licensedb.aboutcode.org/bsd-no-disclaimer-unmodified.html>.
2025-03-16 14:22:00 +03:00
Matt Sturgeon 0be0e7529b
lib.generators.toLua: support path-values 2025-03-15 11:40:47 +00:00
Matt Sturgeon c347d605c9
lib.types: add luaInline
Represents inline lua as expected by `lib.generators.toLua`, for
embedding raw lua expressions within structurally generated lua.
2025-03-15 10:29:28 +00:00
Matt Sturgeon 7436684102
lib.generators: alias mkLuaInline at the top-level 2025-03-15 10:26:57 +00:00
Johannes Kirschbauer 4f123107b4
lib/types: types.coercedTo deprecate functor.wrapped in favor of functor.payload.elemType 2025-03-15 00:46:02 +09:00
Johannes Kirschbauer f6214eb786
lib/types: types.functionTo deprecate functor.wrapped in favor of functor.payload.elemType 2025-03-15 00:45:39 +09:00
Johannes Kirschbauer 4fe25460e1
lib/types: types.nullOr deprecate functor.wrapped in favor of functor.payload.elemType 2025-03-15 00:45:30 +09:00
Johannes Kirschbauer 05958f27e2
lib/types: types.{unique,uniq} deprecate functor.wrapped in favor of functor.payload.elemType 2025-03-15 00:05:55 +09:00
Robert Hensing 877ebad7fa
lib/path: allow CA paths in hasStorePathPrefix (#386774) 2025-03-12 19:32:12 +00:00
toborwinner ff9b3598e6
lib.modules: simplified logic in zipAttrsWith and minor cleanup 2025-03-10 17:05:22 +01:00
Mikael Voss 7a07cc0da9
lib/strings: allow CA paths in isStorePath 2025-03-05 13:08:41 +01:00
Mikael Voss 6e2e984af0
lib/path: allow CA paths in hasStorePathPrefix 2025-03-05 10:30:08 +01:00
Wroclaw 0de1d18795 lib.types.functionTo: preserve functionArgs
Previously if function in defs had set pattern in argument,
this information would be lost.

This keeps functionArgs in set pattern,
by using functor and `__functionArgs`
that is later used by `lib.functionArgs`.
2025-03-02 00:04:19 +01:00
Johannes Kirschbauer 0e46672592
lib.types: Make functor.wrapped deprecation work in unprocessed types (#382848) 2025-02-21 15:57:20 +07:00
Johannes Kirschbauer 0d52202380
lib.strings: init toSentenceCase (#381802) 2025-02-20 07:58:44 +07:00
Martin Fink 2607578cc4 lib.systems.architectures: add sierra forest 2025-02-19 19:25:03 +01:00
isabel b109863c25 lib.strings: init toSentenceCase 2025-02-19 12:10:39 +00:00
Johannes Kirschbauer fb79705bca
lib.types: improve tests for deprecation warning on all migrated types 2025-02-19 16:54:55 +07:00
Silvan Mosberger 64a1c1da3e
lib.types: Make functor.wrapped deprecation work in unprocessed types
Otherwise nested types such as `attrsOf (attrsOf int)` won't have a
backwards compatible `type.nestedTypes.elemType.functor.wrapped`.

Follow-up work to https://github.com/NixOS/nixpkgs/pull/366015
2025-02-19 16:10:27 +07:00
Johannes Kirschbauer 7bbacbb11b
Revert "lib.types.attrsWith: remove failing test" (#382856) 2025-02-19 16:07:48 +07:00
lassulus 642babe809
Docs: migrate format of comments to doc-comments (#381381) 2025-02-19 13:51:23 +07:00
Johannes Kirschbauer 3f9d8a1fea
lib/pathWith: keep old typename, to avoid breakage in downstream projects 2025-02-19 09:03:18 +07:00
Silvan Mosberger bdddb0c517 Revert "lib.types.attrsWith: remove failing test"
This reverts commit ce8f304bb6.

The problem was simply a typo (nestedTypes.elemType ->
type.nestedTypes.elemType) ! And CI didn't run for lib in the orginal
PR which is why it didn't get caught.
2025-02-17 16:19:40 +01:00
Johannes Kirschbauer 2f6b75b26a
lib/types: add types.pathWith (#373287) 2025-02-17 09:56:48 +07:00
Jeremy Fleischman 6d7f6a92cc
lib/types: add types.pathWith
This gives people some flexibility when they need a path type, and
prevents a "combinatorial explosion" of various path stops.

I've re-implemented our existing `path` and `pathInStore` types using
`pathWith`. Our existing `package` type is potentially a candidate for
similar treatment, but it's a little quirkier (there's some stuff with
`builtins.hasContext` and `toDerivation` that I don't completely
understand), and I didn't want to muddy this PR with that.

As a happy side effect of this work, we get a new feature: the ability
to create a type for paths *not* in the store. This is useful for when a
module needs a path to a file, and wants to protect people from
accidentally leaking that file into the nix store.
2025-02-15 16:14:06 +07:00
Daniel Flanagan 208049c89c
docs(lib): fix weird structures in attrsets docstrings 2025-02-14 23:04:58 -06:00
Johannes Kirschbauer ef85e0daa0
Format: lib/path.nix 2025-02-12 15:01:45 +07:00
Johannes Kirschbauer d89ad6c70e
Format: lib/versions.nix 2025-02-12 15:01:45 +07:00
Johannes Kirschbauer e0fe216f49
Format: lib/fileset/internal.nix 2025-02-12 15:01:45 +07:00
Johannes Kirschbauer 80d5b411f6
Format: lib/sources.nix 2025-02-12 15:01:45 +07:00
Johannes Kirschbauer 88f912da48
Docs: migrate format of comments to doc-comments 2025-02-12 15:01:43 +07:00
Johannes Kirschbauer 9d3e649939
lib.types: init mergeTypes (#364620) 2025-02-10 22:10:30 +07:00
Johannes Kirschbauer 3c911b2aca
lib.types: init mergeTypes 2025-02-10 21:23:12 +07:00
Robert Hensing a7c201020d
lib: Discourage use of extend (#376033) 2025-02-09 21:04:55 +01:00
Mathias Koehler 8722c7acbd lib.systems: add znver5 architecture 2025-02-09 19:07:42 +01:00
Robert Hensing 832e3542b6
lib/modules: improve mismatching class error mesage (#377345) 2025-02-08 17:54:09 +01:00
Gutyina Gergő 547acecdf3
teamspeak5_client: 5.0.0-beta77 -> 6.0.0-beta2; teamspeak refactors (#377748)
* teamspeak5_client: 5.0.0-beta77 -> 6.0.0-beta2, rename to teamspeak-6-client

* teamspeak6-client: refactor

* lib.licenses: add teamspeak license

* teamspeak{3,_server,6-client}: use teamspeak license

* teamspeak{6-client,_server}: move to pkgs/by-name

* teamspeak_server: fix meta.platforms

* teamspeak6-client: add update script
2025-02-07 20:33:09 +01:00
Robert Hensing 55a11de1b0 lib/default.nix: Update extend doc
Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2025-01-29 22:13:16 +01:00
Johannes Kirschbauer b3884c8b7d
lib/modules: tests change expected error for class mismatch 2025-01-29 11:50:16 +01:00
Johannes Kirschbauer 5c35166b71
lib/modules: improve mismatching class error mesage 2025-01-29 11:49:20 +01:00
K900 7c251e2b5f
Revert "pkgs/top-level: make package sets composable" 2025-01-26 09:43:44 +03:00
Wolfgang Walther eec21001b0
nixos/nixpkgs: pass original system args instead of elaborated
Passing the elaborated system defeats what pkgs/top-level/default.nix
tries to do: Pass only the original args and let defaults be inferred.

The underlying problem is that lib.systems.elaborate can not deal with
arbitrary overrides, but will often return an inconsistent system
description when partially overriding some values. This becomes most
prominent if trying to override an already elaborated system.
2025-01-25 18:55:03 +01:00
Robert Hensing 0f9034d8b5 lib: Discourage use of extend
It creates interoperability issues that can not be reconciled by
`lib` or maintainers of projects that use the Nixpkgs library.
Occasionally, end users may be able to solve the problems they run
into, but most are not prepared to deal with this set of problems,
nor should they be.

Typical conflict:
- User wants to propagate their own lib, because it has some function
  they like to use throughout their projects
- Project maintainer requires the project's lib to be used

No sane language uses a single namespace for combining all the things.
(Arguably not even C with its extensive use of prefixing)

Meanwhile, in Nix, all symbols are first class variables. We don't even
have the concept of a global top-level namespace to pour everything into.
With `lib` you can try to approximate that, I get the appeal of its
apparent simplicity, but since `lib` can't be global, we just don't even
get that apparent simplicity.

I apologize for not offering concrete solutions to this in the text.
The manuals are limited to reference documentation.
Alternatives - of which we have multiple - are best provided in
task-oriented documentation, e.g. nix.dev.
2025-01-23 08:27:29 +01:00
Philip Taron b83e120344
lib.extendMkDerivation: init (#234651)
It's not the longest-open PR (May 28, 2023 -> Jan 22, 2025) but it took a while. This PR introduces a unified approach to implementing build helpers that support fixed-point arguments and bring such support to existing build helpers.
2025-01-22 05:10:25 -08:00
Tristan Ross e427a1d3bb
llvmPackages.libc: init at 20.0.0-unstable-2024-12-08 (#363449) 2025-01-19 19:42:06 -08:00
Yueh-Shun Li 2439ead791 lib.extendMkDerivation: init
Add functions extendMkDerivation to lib.customisation.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Lin Jian <me@linj.tech>
Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-01-18 14:20:45 +08:00
Johannes Kirschbauer 77156bcc8f
doc: improve lib.options reference documentation (#316862)
* Doc: lib/options fixup wording and references

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2025-01-13 22:02:34 +01:00
Silvan Mosberger b2ddf2d7d6
lib.collectModules: improve readability by replacing implication (#369792) 2025-01-13 21:35:30 +01:00
Silvan Mosberger 0f880eb305
lib.dropEnd (#370558) 2025-01-13 21:30:30 +01:00
Silvan Mosberger 7277b3a840
doc: improve lib.compareLists documentation (#368360) 2025-01-13 21:10:51 +01:00
Tristan Ross 41b14024d2
pkgs/top-level/stage.nix: add pkgsLLVMLibc 2025-01-10 20:54:19 -08:00
Johannes Kirschbauer 477b98b2a9
doc: improve lib.compareLists documentation 2025-01-09 11:25:44 +01:00
piegames 31777a589c
More string fixes (#367757) 2025-01-08 20:12:26 +01:00
Johannes Kirschbauer 8d18b516a2
docs: init lib.stringsWithDeps.textClosureList (#369776) 2025-01-08 13:43:09 +01:00
piegames dd7d5339f7 treewide: Fix incorrect string indentations 2025-01-07 19:49:28 +01:00
piegames 603733851b treewide: Fix incorrect string escapes 2025-01-07 19:49:28 +01:00
Johannes Kirschbauer 5782ef8dc3
lib/types: deprecate functor.wrapped in types.listOf 2025-01-06 16:01:02 +01:00
Johannes Kirschbauer 3d92f38fbd
lib/types: refactor elemTypeFunctor for types.attrsWith 2025-01-06 15:24:48 +01:00
Robert Hensing 782a0e6581 lib.dropEnd: init
Naming borrowed from Haskell
- `base`: [`dropWhileEnd`]
- `extra`, `mono-traversable`, ...: [`dropEnd`]

[`dropEnd`]: https://hackage.haskell.org/package/mono-traversable-1.0.21.0/docs/Data-Sequences.html#v:dropEnd
[`dropWhileEnd`]: https://hackage.haskell.org/package/base-4.21.0.0/docs/Data-List.html#v:dropWhileEnd
2025-01-03 12:04:06 +01:00
Robert Hensing c96e907825 lib/tests/misc: Test lib.drop 2025-01-03 12:03:33 +01:00
Johannes Kirschbauer e51cc8a2a6
lib.collectModules: improve readability by replacing implication 2024-12-31 22:47:20 +01:00
Weijia Wang 2927d4b6ba lib/trivial: update oldestSupportedRelease 2024-12-31 22:15:23 +01:00
nicoo f91fbd1624
Merge #361424: refactor lib.packagesFromDirectoryRecursive (v2) 2024-12-28 21:11:11 +00:00
Vladimír Čunát fc9c33366b
staging-next 2024-12-04 (#361878) 2024-12-23 14:57:53 +01:00
Silvan Mosberger d510f60a4d
lib.generators.toPlist: escape XML syntax in strings & keys (#356502) 2024-12-23 13:47:44 +01:00
Linnnus d1cb670ee6 lib.generators.toPlist: escape XML syntax in strings & keys
Before this patch, code like this would break generate invalid XML:

    lib.generators.toPlist {} "ab<cd"

That's obviously bad, since the call to toPlist often happens through
indirection, as is the case in e.g. the nix-darwin project. A user might
not realize that they have to escape the strings.

This patch adds the argument 'escape' to lib.generators.plist and emits
a warning if it is not set to true. In a future release, this behavior
should become the default.

I have also added a note for future maintainers, in case I forget to
actually remove the deprecated functionality in a future release.
2024-12-23 12:29:20 +01:00
github-actions[bot] 36d6a1bccd
Merge master into staging-next 2024-12-21 00:14:11 +00:00
Yueh-Shun Li e5a9567c3a lib.customisation: remove dead code
Remove unneeded function inheritance in the let-in block.
2024-12-20 21:02:54 +08:00
Yueh-Shun Li 8788c4bff9 lib/customisation.nix: format with nixfmt-rfc-style 2024-12-20 20:57:46 +08:00
github-actions[bot] 12c211c64e
Merge master into staging-next 2024-12-18 00:15:09 +00:00
Robert Hensing efd4a649fe lib/tests/release.nix: Expose system parameter 2024-12-16 23:49:08 +01:00
github-actions[bot] 8c5656aa89
Merge master into staging-next 2024-12-15 00:17:27 +00:00
sternenseemann a0a35b6c24
Fix cross eval issues (#362546) 2024-12-14 22:14:52 +01:00
Artturin 764c99481a lib/tests/release.nix: Fix build if impure.nix returns a cross pkgs
In https://www.github.com/NixOS/nixpkgs/pull/341067 `ofborg-eval-lib-tests`
fails because it uses `pkgsHostTarget` of the cross pkgs

```diff
diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix
index 4d847e280f4b..7f0099b254f0 100644
--- a/pkgs/top-level/impure.nix
+++ b/pkgs/top-level/impure.nix
@@ -86,4 +86,6 @@ assert args ? system -> !(args ? localSystem);

 import ./. (builtins.removeAttrs args [ "system" ] // {
   inherit config overlays localSystem;
-})
+} // (if ((localSystem.system or localSystem) == "x86_64-linux" || (localSystem.system or localSystem) == "aarch64-linux") then {
+  crossSystem = { config = "aarch64-unknown-linux-gnu"; };
+  } else {}) )
```
2024-12-12 21:09:56 +02:00
nicoo 065b48084f lib.packagesFromDirectoryRecursive: let-bind functions called from lib
I was told it is better for eval performance:
  https://github.com/NixOS/nixpkgs/pull/361424#discussion_r1879975642
2024-12-12 18:48:45 +00:00
nicoo 1db8650fb4 lib.packagesFromDirectoryRecursive: refactor, again
This is a second take on #359941, which was reverted by
  940db5766a.

Co-authored-by: Silvan Mosberger <github@infinisil.com>
2024-12-12 18:48:09 +00:00
K900 81eb6d64ab Merge remote-tracking branch 'origin/master' into staging-next 2024-12-12 21:08:33 +03:00
Jean-François Roche fc31945f1e
lib/systems/parse.nix: mkSkeletonFromList: improve error message (#211213)
Include the system string in the error message to give a bit more context to
the user.

Co-authored-by: Wolfgang Walther <wolfgangwalther@users.noreply.github.com>
2024-12-12 18:30:47 +01:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Silvan Mosberger 84d4f874c2 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00
github-actions[bot] ceb62729d2
Merge master into staging-next 2024-12-09 18:05:05 +00:00
Silvan Mosberger 33fe023937
lib/types: make pattern of strMatching accessible (#350467) 2024-12-09 17:53:38 +01:00
Silvan Mosberger 3fe041e8bf lib.types: Add test for merging strMatching 2024-12-09 17:40:32 +01:00
Silvan Mosberger 062945b725
lib.types: chore use consistent payload form (#363565) 2024-12-09 16:23:19 +01:00
Johannes Kirschbauer d504a1e680
lib.types.attrsWith: add placeholder parameter 2024-12-09 15:25:18 +01:00
Johannes Kirschbauer f407f6f57e
lib.types: chore use consistent payload form 2024-12-09 14:09:16 +01:00
github-actions[bot] 38a78130f6
Merge master into staging-next 2024-12-08 12:05:39 +00:00
Silvan Mosberger 944f47455e
lib: add defaultTo (#357681) 2024-12-08 10:24:42 +01:00
github-actions[bot] 0597be32bd
Merge master into staging-next 2024-12-06 12:05:59 +00:00
Silvan Mosberger 2936a2ab9b
lib.strings.concatMapAttrsStringSep: init (#330010) 2024-12-06 09:53:50 +01:00
Yueh-Shun Li b1371135b5 lib.strings.concatMapAttrsStringSep: init 2024-12-06 11:02:26 +08:00
github-actions[bot] 35ce54d1fd
Merge master into staging-next 2024-12-05 00:15:50 +00:00
Silvan Mosberger 5adee31c11
lib/types: init {types.attrsWith} (#361391) 2024-12-04 20:51:29 +01:00
github-actions[bot] 31c37acde9
Merge staging-next into staging 2024-12-04 18:05:21 +00:00
nicoo 2f9d395f05
lib.packagesFromDirectoryRecursive: Improved documentation (#359898) 2024-12-04 16:45:45 +00:00
github-actions[bot] df7560310e
Merge staging-next into staging 2024-12-03 12:06:35 +00:00
nicoo 25bdcd51e8 lib.packagesFromDirectoryRecursive: Split and explain examples, warn about scope limitation 2024-12-03 11:01:28 +00:00
nicoo 781b44b39d lib.packagesFromDirectoryRecursive: document inputs better
Cut out redundant boilerplate, explain what the `callPackage` parameter is.

Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
2024-12-03 11:01:12 +00:00
Johannes Kirschbauer ce8f304bb6
lib.types.attrsWith: remove failing test 2024-12-03 10:04:27 +01:00
Johannes Kirschbauer 58c115499f
lib.types: improve performance on attrsWith 2024-12-03 10:03:19 +01:00
Silvan Mosberger e60e2e6916
lib/types: standardise attrsOf functor.wrapped warning and add a test 2024-12-03 10:03:13 +01:00
Silvan Mosberger dbb085549e
lib/modules: Minor performance optimisation
Co-Authored-By: Johannes Kirschbauer <hsjobeki@gmail.com>
2024-12-03 10:03:02 +01:00
Silvan Mosberger e438d6b08d
lib/types: Add deprecation to attrsWith
Co-Authored-By: @infinisil
2024-12-03 10:02:55 +01:00
Silvan Mosberger bd353d322c
lib/types: Test attrsWith type merging
Co-Authored-By: @hsjobeki
2024-12-03 10:02:47 +01:00
Johannes Kirschbauer 5b7a21358d
lib/types: init {types.attrsWith} 2024-12-03 10:02:40 +01:00
K900 907cb3d253
Revert "lib/types: init {types.attrsWith}" 2024-12-03 09:06:24 +03:00
github-actions[bot] 215e1f12a4
Merge staging-next into staging 2024-12-03 06:05:38 +00:00
Aleksana 586f613034
lib/licenses: fix lens license URL (#360654) 2024-12-03 13:17:21 +08:00
github-actions[bot] 9fda0f5ae0
Merge staging-next into staging 2024-12-03 00:16:58 +00:00
K900 6739ae1174 Merge remote-tracking branch 'origin/staging-next' into staging 2024-12-02 22:43:34 +03:00
ash cf9805af62 lib.derivations: add warnOnInstantiate 2024-12-02 19:09:07 +00:00
Silvan Mosberger 23a7a7d8b4
lib/types: init {types.attrsWith} (#354738) 2024-12-02 16:47:32 +01:00
Johannes Kirschbauer 399e582e18
lib.types: improve performance on attrsWith 2024-12-02 16:39:29 +01:00
Silvan Mosberger d5eccbbbae lib/types: standardise attrsOf functor.wrapped warning and add a test 2024-12-02 16:18:03 +01:00
Silvan Mosberger 14f4431d12 lib/modules: Minor performance optimisation
Co-Authored-By: Johannes Kirschbauer <hsjobeki@gmail.com>
2024-12-02 15:54:52 +01:00
K900 aa180fdca0 Merge remote-tracking branch 'origin/staging-next' into staging 2024-12-02 10:34:44 +03:00
K900 940db5766a
Revert "lib.filesystem.packagesFromDirectoryRecursive: refactor (#359941)"
This reverts commit 8a59b79070.
2024-12-02 10:21:52 +03:00
github-actions[bot] ec53e34a1d
Merge staging-next into staging 2024-12-01 12:05:56 +00:00
nicoo 8a59b79070
lib.filesystem.packagesFromDirectoryRecursive: refactor (#359941)
No functional changes.

- Centralize the logic classifying files/directories of interest, instead of
  being spread between `directoryEntryIsPackage` and `directoryEntryToAttrPair`.
- Replace a composition of `mapAttrs'` and `filterAttrs` with `concatMapAttrs`.
- Simplify future improvements, such as creating nested scopes for subdirs,
  or ignoring unsupported files.
2024-12-01 10:07:46 +00:00
Simon Žlender 8ba40fdd4f lib: add defaultTo 2024-12-01 10:58:42 +01:00
Chandler Swift 96a405932d
lib/licenses: fix lens license URL 2024-11-30 21:29:17 -06:00
github-actions[bot] 1ae7d136e8
Merge staging-next into staging 2024-11-30 00:04:18 +00:00
Philip Taron 9396352fba
lib/systems: elaborate properly with non-matching system / config / parsed args (#351608) 2024-11-29 15:48:15 -08:00
nicoo 13b953c864 lib.packagesFromDirectoryRecursive: More precise type signature
Pulled above the inputs section to avoid duplicating information.
2024-11-28 16:27:36 +00:00
github-actions[bot] e645ec8944
Merge staging-next into staging 2024-11-27 06:05:34 +00:00
John Ericson 07f8638828
freebsd: Add support for aarch64 (#358053) 2024-11-26 20:39:38 -05:00
Silvan Mosberger 45f0035a83
lib/types: Add deprecation to attrsWith
Co-Authored-By: @infinisil
2024-11-26 10:27:01 +01:00
K900 3b5cb28a23 Merge remote-tracking branch 'origin/staging-next' into staging 2024-11-26 09:46:04 +03:00
Philip Taron 01fdad87c4
stdenv: add Silvermont support, remove incorrect AES support (#355127) 2024-11-25 10:50:35 -08:00
Silvan Mosberger 415d1932ea lib/types: Test attrsWith type merging
Co-Authored-By: @hsjobeki
2024-11-25 16:06:55 +01:00
github-actions[bot] 9a94a24ad9
Merge staging-next into staging 2024-11-25 14:38:16 +00:00
Johannes Kirschbauer c4a9529071
lib/types: init {types.attrsWith} 2024-11-25 15:11:45 +01:00
Emily 382ef6cd88 Merge staging-next into staging 2024-11-25 02:00:00 +00:00