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

CMakeLists: look for wayland.xml protocol in wayland-scanner pkgdata #197

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

andresilva
Copy link
Contributor

This is required to build on NixOS after NixOS/nixpkgs#214906 (which is already in nixos-unstable-small).

@andresilva
Copy link
Contributor Author

For reasons that I don't understand this doesn't build on current nixos-unstable (i.e. before NixOS/nixpkgs#214906) unless wayland-scanner is declared as a buildInput instead of nativeBuildInput.

@vaxerski vaxerski requested a review from fufexan September 1, 2024 12:45
@fufexan
Copy link
Member

fufexan commented Sep 1, 2024

It will work with wayland-scanner left in nativeBuildInputs, but you have to move pkg-config to depsBuildBuild. (one layer higher in the hierarchy than nativeBuildInputs)

@andresilva
Copy link
Contributor Author

andresilva commented Sep 1, 2024

@fufexan That doesn't seem to work still. The PR works as is on nixos-unstable-small btw, and both pkg-config and wayland-scanner are declared as nativeBuildInputs on the other hyprwm projects.

edit: it seems that it works on nativeBuildInputs only on hypridle, hyprlock and xdg-desktop-portal-hyprland which don't use hyprwayland-scanner. On aquamarine it also only builds with wayland-scanner declared in buildInputs.

@fufexan
Copy link
Member

fufexan commented Sep 1, 2024

I'll take a look. Btw if you're referring to https://nixpk.gs/pr-tracker.html?pr=214906, it's got to nixos-unstable, so it's safe to update the flake as well.

@fufexan
Copy link
Member

fufexan commented Sep 1, 2024

For reasons that I don't understand this doesn't build on current nixos-unstable (i.e. before NixOS/nixpkgs#214906) unless wayland-scanner is declared as a buildInput instead of nativeBuildInput.

It just built for me.

@andresilva
Copy link
Contributor Author

andresilva commented Sep 1, 2024

That's weird. Did it build for you before updating nixos-unstable? It works for me with latest nixos-unstable, but that also works with pkg-config in nativeBuildInputs.

@fufexan
Copy link
Member

fufexan commented Sep 1, 2024

That's weird. Did it build for you before updating nixos-unstable? It works for me with latest nixos-unstable, but that also works with pkg-config in nativeBuildInputs.

Haven't tried that. Anyway, I've noticed pkg-config should be in both depsBuildBuild and nativeBuildInputs, so that it can "see" dependencies "lower" than itself. This is important for cross compiling at least.

@fufexan fufexan force-pushed the andre/wayland-scanner-nixos-split branch from e3f8f5a to 1214418 Compare September 1, 2024 14:19
@fufexan fufexan merged commit 1c18ad6 into hyprwm:main Sep 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants