Skip to content

lib: replace type // { check = ...; } with v2-compatible patterns#1209

Merged
NotAShelf merged 3 commits intomainfrom
notashelf/push-kuokzlukwzxp
Nov 2, 2025
Merged

lib: replace type // { check = ...; } with v2-compatible patterns#1209
NotAShelf merged 3 commits intomainfrom
notashelf/push-kuokzlukwzxp

Conversation

@NotAShelf
Copy link
Owner

Fixes #1207 by replacing ad-hoc type overrides that are incompatible with the new nixpkgs v2 merge mechanism with proper lib.types.addCheck and mkOptionType patterns.

The nixpkgs v2 merge mechanism (introduced in NixOS/nixpkgs#391544) now throws errors when encountering type // { check = ...;} patterns, as documented in NixOS/nixpkgs#454964. This affects our custom type definitions in lib/types/custom.nix and lib/types/dag.nix. We solve this by replacing patterns such as super // { name = "..."; description = "..."; merge = ...; } with new ones.

The changes should be fully backwards compatible, no changelog entry is warranted as the impact is fully internal. Tested with the NixOS module.

Signed-off-by: NotAShelf raf@notashelf.dev
Change-Id: I37ded98877013bf232dfb8d575980de46a6a6964

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I37ded98877013bf232dfb8d575980de46a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If5bf0e5f302afb9f7018b55a96109c006a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I90ce0f42984ffbca9dfbdf4d97d2fc636a6a6964
@Soliprem
Copy link
Collaborator

Soliprem commented Nov 2, 2025

image the "typo" is from a release-note where the typo is fixed

@NotAShelf NotAShelf merged commit 20d8fca into main Nov 2, 2025
9 of 10 checks passed
@NotAShelf NotAShelf deleted the notashelf/push-kuokzlukwzxp branch November 2, 2025 14:26
mlambie added a commit to mlambie/nvf that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type // { check = ...; } is incompatible with the new nixpkgs merge mechanism

2 participants