-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated nix overlay to support wayland and X11 at the same time (and remove eww-wayland overlay) #748
base: master
Are you sure you want to change the base?
Conversation
As of 82e13c1, it builds only with wayland feature so it opens as a regular window on x11. |
82e13c1
to
b270d2c
Compare
Ah, yeah the common pitfalls of overwriting constructor functions (in this case |
…remove eww-wayland overlay)
b270d2c
to
df6bed4
Compare
It does not build with x11 feature.
Cargo invokation was
|
Are you sure, that it's not having the x11 feature? AFAIK features are additive as long as default features aren't explicitly disabled. So this should be equivalent to just (roughly) |
Oh, I didn't see you've enabled the default features. It seems fine. I could close my PR #734 but what about the comment #734 (comment) ? |
flake.nix
Outdated
version = self.rev or "dirty"; | ||
src = builtins.path { name = "eww"; path = prev.lib.cleanSource ./.; }; | ||
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; }; | ||
cargoBuildNoDefaultFeatures = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double negative (cargoBuildNoDefaultFeatures
and false
) is confusing a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I also don't understand why the authors of buildRustPackage
have chosen the naming of this...
But AFAIK it's the var that's necessary to use to enable/disable default features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably due to how cargo named it (cargo build --no-default-features
)
As mentioned before, I would do these things/changes in the nixpkgs repo (add So if a user really only wants X11 or wayland, the user has to explicitly disable the other features (i.e. stay close to the default features of eww). I would update these things in nixpkgs when the next release of eww happens. |
@@ -6,7 +6,7 @@ | |||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; | |||
}; | |||
|
|||
outputs = { self, nixpkgs, rust-overlay, flake-compat, ... }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake-compat
is used in default.nix, revert this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a non issue though, as default.nix
reads directly from the flake.lock
and this is just a destructuring pattern of the function argument (flake-compat
is not used anywhere in the flake.nix
). I have not removed the flake input though (which AFAIK is the only necessary thing for an entry in the flake.lock
).
Was this tested (runtime)? I imagine #739 would cause problems and this change maybe doesn't make sense to merge as is (right now) fwiw turning off default features and building with wayland does work regardless |
You're correct just tested it in hyprland, seems like I forgot to test this properly with wayland, #739 seems to be an issue. Well than the question arises, if #739 should be fixed first, or I'm handling the cases differently (i.e. disable the I think it makes sense to offer multiple flake outputs ( |
Since it's a simple change, I've updated the PR to support wayland separately (by implicitly disabling the feature |
Thanks for the info, I've updated the overlays accordingly (including necessarily the flake inputs). |
Description
Fixes #733
Since X11 and wayland is now supported at the same time, eww could be reduced to the same package
eww
.Right now this builds with support for X11 and wayland (default features). It may make sense to add more fine-grained support for different features in upstream via parameters, when it is updated there (i.e.
withWayland
,withX11
, for either X11 or wayland support or both at the same time (should probably be the default then)) .