Skip to content

nix: fix overlay composition#4555

Merged
fufexan merged 1 commit intohyprwm:mainfrom
GrizzlT:nix-overlay-fix
Jan 28, 2024
Merged

nix: fix overlay composition#4555
fufexan merged 1 commit intohyprwm:mainfrom
GrizzlT:nix-overlay-fix

Conversation

@GrizzlT
Copy link
Contributor

@GrizzlT GrizzlT commented Jan 28, 2024

Describe your PR, what does it fix/add?

The nix overlay defined in nix/overlays.nix defines a function called mkJoinedOverlays to combine the correct dependencies for hyprland. This function however only combines the result of multiple overlays but does not provide the dependency overlay outputs to callPackage as an input when defining the hyprland package. This means that the internal dependency wlroots-hyprland must be defined on the final nixpkgs fixpoint.

To avoid name clashes, I personally shadow my flake input's overlays to provide a cleaner package set when selecting packages (i.e. hide internal dependencies). Because the hyprland overlay depends on the final package set to have a root wlroots-hyprland package, this prohibits my workflow. This PR fixes that.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This fix should be fully backwards compatible. I have tested that the overlay output package is a derivation. I have not tested the theoretical possibility of still manually overriding wlroots-hyprland using hyprland.override { ... }. This should however work since the hyprland package is a standard mkDerivation result.

Is it ready for merging, or does it need work?

ready, do I need formatting?

Copy link
Member

@fufexan fufexan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@fufexan fufexan merged commit 7009dc9 into hyprwm:main Jan 28, 2024
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.

2 participants