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

Revert "Revert "wayland: mark as broken on darwin"" #214895

Closed
wants to merge 1 commit into from

Conversation

wegank
Copy link
Member

@wegank wegank commented Feb 6, 2023

Description of changes

tl;dr: It is a mistake to port one package to macOS while breaking tons of others.

This PR reverts #214828, which misleadingly builds a stub Wayland package on macOS (see #214828 (comment)) and causes build failures on almost all packages marked as broken transitively by Wayland before.

The issue was observed at least two weeks ago, in #212123, when the maintainer discovered that inherit (wayland.meta) platforms didn't work as intended on macOS.

cc @alyssais @figsoda

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Feb 6, 2023
@wegank wegank requested review from alyssais and figsoda February 6, 2023 08:13
@ofborg ofborg bot added 10.rebuild-darwin: 101-500 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Feb 6, 2023
@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

As I explained, a Wayland package on macOS is useful because of wayland-scanner (which is in the bin output, hence you not finding it in #214828 (comment)). Wayland can be built for all Unixes to provide wayland-scanner, and it is necessary to have when cross-compiling to Linux.

Indeed wayland.meta.platforms does include Darwin, but this is correct, as the package does build for Darwin and contain useful functionality. It does not include all functionality, but that's not something that meta.platforms can encode.

In spite of this, if you still think this change is the right thing to do, then I would like to suggest we ask for third opinions from my co-maintainers of the Wayland package: @primeos @codyopel.

@alyssais alyssais requested review from primeos and codyopel February 6, 2023 09:04
@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

(I'm also happy to go through and fix any incorrect occurrences on wayland.meta.platforms or similar — there seem to be a few but not that many. But I'd leave it for a few days, because I'm about to PR full FreeBSD support for our Wayland package, including the libraries, and that'll make it easier to test what the actually supported platforms for each compositor are: just Linux, or Linux+FreeBSD.)

@wegank
Copy link
Member Author

wegank commented Feb 6, 2023

Indeed wayland.meta.platforms does include Darwin, but this is correct, as the package does build for Darwin and contain useful functionality. It does not include all functionality, but that's not something that meta.platforms can encode.

I'm having an unofficial full-fledged Wayland package on macOS in my repo, so doing a simple comparison, I don't agree if what betweens useful and all functionality includes the non-existence of headers in wayland.dev and libraries in wayland:

$ find result-dev/
result-dev/
result-dev//nix-support
result-dev//nix-support/propagated-build-inputs
result-dev//lib
result-dev//lib/pkgconfig
result-dev//lib/pkgconfig/wayland-scanner.pc
result-dev//share
result-dev//share/aclocal
result-dev//share/aclocal/wayland-scanner.m4

(I'm also happy to go through and fix any incorrect occurrences on wayland.meta.platforms or similar — there seem to be a few but not that many. But I'd leave it for a few days, because I'm about to PR full FreeBSD support for our Wayland package, including the libraries, and that'll make it easier to test what the actually supported platforms for each compositor are: just Linux, or Linux+FreeBSD.)

I'll be happy to test epoll-shim on macOS, if you decide to use the latest git version.

@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

I'm having an unofficial full-fledged Wayland package on macOS in my repo

That's cool! I hope you can upstream it, as that would resolve all our problems here. :)

I'll be happy to test epoll-shim on macOS, if you decide to use the latest git version.

That's exactly what I'll be doing, because the latest git commit is a build fix from me. :P

@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

I don't agree if what betweens useful and all functionality includes the non-existence of headers in wayland.dev and libraries in wayland:

I'm not entirely sure I understand what you mean here, but the headers should be built if and only if the libraries are, since otherwise the headers would be useless. The reason to have current Wayland be buildable for macOS and other Unixes is to have the wayland-scanner binary and associated .pc file available.

@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

@wegank would #214906 be an acceptable solution?

@wegank
Copy link
Member Author

wegank commented Feb 6, 2023

@wegank would #214906 be an acceptable solution?

Thanks! I've also been trying to do something similar for the last hour, realizing finally that anything I can do should go to staging. So I think I'll close this PR now in favor of yours.

@wegank wegank closed this Feb 6, 2023
@wegank wegank deleted the revert-214828-wayland-revert branch February 6, 2023 10:19
@alyssais
Copy link
Member

alyssais commented Feb 6, 2023

Cool. Glad we've got a path forward. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 101-500 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants