Skip to content
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

Merged
merged 5 commits into from Dec 19, 2020
Merged

wayfire: init at 0.6.0 #86606

merged 5 commits into from Dec 19, 2020

Conversation

alyssais
Copy link
Member

@alyssais alyssais commented May 2, 2020

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@alyssais
Copy link
Member Author

alyssais commented May 2, 2020

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…

@alyssais
Copy link
Member Author

alyssais commented May 3, 2020 via email

@wucke13
Copy link
Contributor

wucke13 commented May 4, 2020

You may add me to the maintainers, if you'd like to.

@alyssais
Copy link
Member Author

alyssais commented May 7, 2020 via email

Copy link
Contributor

@wucke13 wucke13 left a 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 ];
Copy link
Contributor

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?

Copy link
Member Author

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" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Member Author

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 ];
Copy link
Contributor

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?

Copy link
Member Author

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 ];
Copy link
Contributor

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;

Copy link
Contributor

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?

Copy link
Member Author

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; }

Copy link
Member Author

Choose a reason for hiding this comment

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

I’ll resort alphabetically :)

@wucke13
Copy link
Contributor

wucke13 commented May 9, 2020

Huh, on running this standalone I lost the icons on wcm. Maybe wrapGAppsHook is necessary?

Also: We should look at adding some facility for launching dbus to the package. Otherwise things like the gnome pinentry won't work.
ATM I'm using this alias in my shell rc, however that is not such a nice solution:

alias wayfire='[ -z "$DBUS_SESSION_BUS_ADDRESS" ] && export `dbus-launch`; MESA_LOADER_DRIVER_OVERRIDE=i965 wayfire'

ping @alyssais

@alyssais
Copy link
Member Author

alyssais commented Jun 2, 2020

Sorry for being slow with this.

Huh, on running this standalone I lost the icons on wcm. Maybe wrapGAppsHook is necessary?

I tried adding that to both wf-shell and wcm, but still no icons. Any other ideas? Did it work in your PR?

Also: We should look at adding some facility for launching dbus to the package. Otherwise things like the gnome pinentry won't work.

Good idea. I’ll have a look at the sway wrapper and see what goodies we can steal.

@ofborg ofborg bot requested a review from wucke13 June 2, 2020 01:45
@wucke13
Copy link
Contributor

wucke13 commented Jun 2, 2020

Sorry for being slow with this.

No worries!

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.

Good idea. I’ll have a look at the sway wrapper and see what goodies we can steal.

Sweet!

@wucke13
Copy link
Contributor

wucke13 commented Aug 5, 2020

@alyssais
What about the new release? Can you update your PR accordingly?

@alyssais alyssais force-pushed the wayfire branch 2 times, most recently from 797f227 to a841fbb Compare August 11, 2020 17:52
@alyssais
Copy link
Member Author

alyssais commented Aug 11, 2020 via email

@alyssais alyssais changed the title wayfire: init at 0.4.0 wayfire: init at 0.5.0 Aug 11, 2020
@wucke13
Copy link
Contributor

wucke13 commented Aug 13, 2020

@alyssais What icons are missing? I think the issue which I meant is solved in your PR:
2020-08-13_23:58:25

@alyssais
Copy link
Member Author

alyssais commented Aug 14, 2020 via email

@wucke13
Copy link
Contributor

wucke13 commented Aug 15, 2020

No, but I had it installed. So maybe it did some GTK RC magic which fixes the issue?

@alyssais
Copy link
Member Author

alyssais commented Dec 12, 2020 via email

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.
@alyssais alyssais changed the title wayfire: init at 0.5.0 wayfire: init at 0.6.0 Dec 12, 2020
@alyssais alyssais merged commit c898def into NixOS:master Dec 19, 2020
@alyssais alyssais deleted the wayfire branch December 19, 2020 01:41
owner = "WayfireWM";
repo = "wcm";
rev = "v${version}";
sha256 = "1b22gymqfn0c49nf39676q5bj25rxab874iayiq31cmn14r30dyg";

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants