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
wayfire: init at 0.6.0 #86606
wayfire: init at 0.6.0 #86606
Conversation
I’ve realised that wcm will need to be wrapped too, so I’d like to come up with some nice function that maybe gives you an attrset with wlc and wayfire packages, both wrapped with the right environment variables set. The hard part is coming up with a name… |
I’ve realised that wlc will need to be wrapped too, so I’d like to
come up with some nice function that maybe gives you an attrset with
wlc and wayfire packages, both wrapped with the right environment
variables set. The hard part is coming up with a name…
I've now done this:
Wayfire and WCM can both be built with a custom plugin set like so:
with wayfireApplications.withPlugins (ps: with ps; [ wf-shell ]);
[ wayfire wcm ]
The default wayfireApplications in Nixpkgs has just wf-shell available.
An unwrapped wayfireApplications is available as
wayfireApplications-unwrapped.
|
You may add me to the maintainers, if you'd like to. |
You may add me to the maintainers, if you'd like to.
Done! :)
What do you think of the PR? Is there anything from yours you think we
should incorporate?
|
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.
I left a few comments and questions. Mostly things that I don't understand 😆
In general, the PR looks good to me. Compilation works, including icons for wcm
and wf-shell
]; | ||
|
||
strictDeps = true; | ||
nativeBuildInputs = [ meson ninja pkg-config wayland git ]; |
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.
Why are git
and wayland
in the nativeBuildInputs
?
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.
Wayland was there for wayland-scanner. Not sure why git was there. Seems to work fine without it so I’ll drop it.
wayland-protocols wf-config wlroots | ||
]; | ||
|
||
mesonFlags = [ "--sysconfdir" "/etc" ]; |
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.
Why is this needed?
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.
So that Wayfire default configuration files can be placed in /etc. Otherwise people would have no way to set those, because Wayfire would look in its prefix, which can’t be altered.
strictDeps = true; | ||
nativeBuildInputs = [ meson ninja pkg-config ]; | ||
buildInputs = [ libevdev libxml2 ]; | ||
propagatedBuildInputs = [ glm ]; |
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.
Out of curiosity, why is propagatedBuildInputs
used here for the glm
dep?
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.
Because any package that has wf-config as an input also needs glm as an input. This would otherwise have to be copied every time something had a wf-config input.
]; | ||
|
||
strictDeps = true; | ||
nativeBuildInputs = [ meson ninja pkg-config wayland git ]; |
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.
Again, isn't this missing the ?wrapGAppsHook
It is not, because of gnome.gtk
in buildInputs
?
|
||
wayfireApplications = wayfireApplications-unwrapped.withPlugins (plugins: [ plugins.wf-shell ]); | ||
inherit (wayfireApplications) wayfire wcm; | ||
|
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.
I would prefer these to be sorted alphanumerical. Maybe like this:
wayfireApplications = wayfireApplications-unwrapped.withPlugins (plugins: [ plugins.wf-shell ]);
inherit (wayfireApplications) wayfire wcm;
wayfireApplications-unwrapped = callPackage ../applications/window-managers/wayfire/applications.nix { };
wayfirePlugins = callPackage ../applications/window-managers/wayfire/plugins.nix {
inherit (wayfireApplications-unwrapped) wayfire;
};
wf-config = callPackage ../applications/window-managers/wayfire/wf-config.nix { };
Also: How does this work without defining wcm
as a package?
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.
Also: How does this work without defining
wcm
as a package?
{ inherit (wayfireApplications) wayfire wcm; }
is equivalent to
{ wayfire = wayfireApplications.wayfire;
wcm = wayfireApplications.wcm; }
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.
I’ll resort alphabetically :)
Huh, on running this standalone I lost the icons on wcm. Maybe Also: We should look at adding some facility for launching
ping @alyssais |
Sorry for being slow with this.
I tried adding that to both wf-shell and wcm, but still no icons. Any other ideas? Did it work in your PR?
Good idea. I’ll have a look at the sway wrapper and see what goodies we can steal. |
No worries!
In my PR all icons but the one on the "Back" icon work.
Sweet! |
@alyssais |
797f227
to
a841fbb
Compare
> I tried adding that to both wf-shell and wcm, but still no icons. Any other ideas? Did it work in your PR?
In my PR all icons but the one on the "Back" icon work.
I tried out your PR, and while icons for individual settings views in
WCM, the header icons didn't.
I managed to get this PR to the same functionality, but it's still not
quite right.
|
@alyssais What icons are missing? I think the issue which I meant is solved in your PR: |
@alyssais What icons are missing? I think the issue which I meant is
solved in your PR:
Interesting! I don't get the "General", "Accessibility", etc. icons.
Do you have GNOME enabled?
|
No, but I had it installed. So maybe it did some GTK RC magic which fixes the issue? |
I've realised that I have the same problem with other GTK applications,
so it's not a Wayfire issue and therefore doesn't need to hold up this
PR.
As for the D-Bus stuff, it's really not an area I know anything about,
so I think it would be best addressed by somebody else as a follow-up to
this PR.
So my plan here I think is to update to the newest Wayfire release, and
then if there's nothing else outstanding I'll merge not long afterward.
|
The top-level "wayfire" attribute is a Wayfire with wf-shell installed and nothing else. But wayfireApplications.withPlugins can be used to create a Wayfire with arbitrary plugins, or no plugins at all.
owner = "WayfireWM"; | ||
repo = "wcm"; | ||
rev = "v${version}"; | ||
sha256 = "1b22gymqfn0c49nf39676q5bj25rxab874iayiq31cmn14r30dyg"; |
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.
I seem to get a hash mismatch with this:
unpacking source archive /build/v0.6.0.tar.gz
hash mismatch in fixed-output derivation '/nix/store/lbyaykpqg15k20v18qvmmzyar7vdd3w6-source':
wanted: sha256:1b22gymqfn0c49nf39676q5bj25rxab874iayiq31cmn14r30dyg
got: sha256:0xdjrmpdwag2d7bhqa2iall0rdsqpzfgix279lp2zy1ldw9gzg1n
Motivation for this change
I’ve been working this for the past few days independently of #86569, which I just saw. We should compare the two and see if we can combine approaches.
The major difference is that this PR supports Wayfire plugins through a standard Nixpkgs-style
wayfire.withPackages
interface. Upstream Wayfire only works if plugins are installed into Wayfire’s prefix, which isn’t really an option for us, at least with arbitrary plugins. But the good news is they understand the problem, and are willing to accept my patches. So everything that’s a patch in this PR should hopefully be part of the next Wayfire release, at which point these patches can all be dropped.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)