Skip to content

top-level/stage: assert no by-name overwrites#454147

Closed
wolfgangwalther wants to merge 1 commit intoNixOS:masterfrom
wolfgangwalther:by-name-assert-no-overrides
Closed

top-level/stage: assert no by-name overwrites#454147
wolfgangwalther wants to merge 1 commit intoNixOS:masterfrom
wolfgangwalther:by-name-assert-no-overrides

Conversation

@wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented Oct 21, 2025

This asserts that no by-name packages are overwritten by definitions in all-packages.nix.

The relevant code from

{
# This attribute is necessary to allow CI to ensure that all packages defined in `pkgs/by-name`
# don't have an overriding definition in `all-packages.nix` with an empty (`{ }`) second `callPackage` argument.
# It achieves that with an overlay that modifies both `callPackage` and this attribute to signal whether `callPackage` is used
# and whether it's defined by this file here or `all-packages.nix`.
# TODO: This can be removed once `pkgs/by-name` can handle custom `callPackage` arguments without `all-packages.nix` (or any other way of achieving the same result).
# Because at that point the code in ./stage.nix can be changed to not allow definitions in `all-packages.nix` to override ones from `pkgs/by-name` anymore and throw an error if that happens instead.
_internalCallByNamePackageFile = file: self.callPackage file { };
}
can only be removed once nixpkgs-vet has removed the check, too.

Things done


Add a 👍 reaction to pull requests you find important.

This asserts that no by-name packages are overwritten by definitions in
all-packages.nix.
@wolfgangwalther wolfgangwalther force-pushed the by-name-assert-no-overrides branch from cab4cd0 to c6ac6df Compare October 22, 2025 11:20
@wolfgangwalther
Copy link
Contributor Author

wolfgangwalther commented Oct 22, 2025

Excuse me, GitHub? I did not close this.

Bot the combo of close + force push... does not allow me to re-open it again. Will need to open a new PR, gnah...

New PR in #454525.

@philiptaron
Copy link
Contributor

What even happened?!

@wolfgangwalther wolfgangwalther deleted the by-name-assert-no-overrides branch December 10, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants