eww
eww copied to clipboard
Updated nix overlay to support wayland and X11 at the same time (and remove eww-wayland overlay)
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)) .
As of 82e13c18d3bbba3ab9a2bff8096a2ae98b030b35, it builds only with wayland feature so it opens as a regular window on x11.
Ah, yeah the common pitfalls of overwriting constructor functions (in this case buildRustPackage
), I think now it should do the right thing.
It does not build with x11 feature.
$ nix build --no-link 'github:Philipp-M/eww/df6bed4d6aee994dac231a787b11fde900a2c486#eww'
$ nix log 'github:Philipp-M/eww/df6bed4d6aee994dac231a787b11fde900a2c486#eww'
Cargo invokation was
env CC_x86_64-unknown-linux-gnu=/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/c++ CC_x86_64-unknown-linux-gnu=/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/3d9zjv5vaqjxb9kwbdqsd194alwm97x1-gcc-wrapper-11.3.0/bin/c++ cargo build -j 8 --target x86_64-unknown-linux-gnu --frozen --release --features=wayland --bin eww
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) cargo build
.
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 https://github.com/elkowar/eww/pull/734#issuecomment-1506478834 ?
As mentioned before, I would do these things/changes in the nixpkgs repo (add supportWayland
and supportX11
to the derivation inputs of eww
and set them to true by default, I don't think the extra dependency really hurts in X11 unless it really changes the behavior of eww
. I think it's better to just support everything by default to avoid headaches.
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.
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 x11
feature for wayland support). I believe fixing #739 would be better to be able to use one binary for all backends.
I think it makes sense to offer multiple flake outputs (eww-x11
, eww-wayland
and eww
which supports both backends)
I believe fixing #739 would be better to be able to use one binary for all backends.
Of course, I agree, my suggestion to build wayland binary without x11 support was just a workaround until #739 is addressed (if this PR were to be merged first). Other option would be to hold off on this PR for now
Since it's a simple change, I've updated the PR to support wayland separately (by implicitly disabling the feature x11
(done by nixpkgs upstream). That way it should be ready to merge anyways (the output eww
just doesn't support wayland currently due to #739)
https://github.com/NixOS/nixpkgs/pull/239826
Thanks for the info, I've updated the overlays accordingly (including necessarily the flake inputs).
The reliance on nixpkgs has been removed, so these changes seem obsolete to me
Yeah, I'll close it, it's very likely obsolete or completely out of date.