hyprwm / hyprpaper

Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.
https://wiki.hyprland.org/Hypr-Ecosystem/hyprpaper/
BSD 3-Clause "New" or "Revised" License
802 stars 57 forks source link

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

Closed andresilva closed 2 months ago

andresilva commented 2 months ago

This is required to build on NixOS after https://github.com/NixOS/nixpkgs/pull/214906 (which is already in nixos-unstable-small).

andresilva commented 2 months ago

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

fufexan commented 2 months ago

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 commented 2 months ago

@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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.