hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.92k stars 849 forks source link

Nix option wayland.windowManager.hyprland.xwayland.enable = false produces build error #7437

Closed beefcarver closed 1 month ago

beefcarver commented 1 month ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: 2024-06-25 Tag: v0.41.2, commits: 918d8340afd652b011b937d29d5eea0be08467f5 flags: (if any) no xwayland System Information: System name: Linux Node name: hextor Release: 6.10.1-zen1 Version: #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.11.20240811.a58bc8a" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.11 (Vicuna)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.11 (Vicuna)" VERSION_CODENAME=vicuna VERSION_ID="24.11" plugins: ======Config-Start====== Config File: /home/b/.config/hypr/hyprland.conf: Read Succeeded exec-once = /nix/store/j8l2v22xypah1srykhwjlkgwwgdxnnpw-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $menu=wofi --show run $mod=SUPER $terminal=alacritty animations { animation=windows, 1, 1.5, default animation=windowsOut, 1, 1.5, default, popin 80% animation=border, 1, 1.5, default animation=borderangle, 1, 1.5, default animation=fade, 1, 1.5, default animation=workspaces, 1, 1.5, default enabled=true first_launch_animation=false } decoration { drop_shadow=false rounding=4 } dwindle { no_gaps_when_only=1 smart_split=true } general { col.active_border=rgba(383838ee) rgba(585858ee) 45deg col.inactive_border=rgba(282828ee) gaps_in=2 gaps_out=4 layout=dwindle resize_on_border=true } gestures { workspace_swipe=true workspace_swipe_forever=true workspace_swipe_invert=false } group { groupbar { col.active=rgba(585858ee) col.inactive=rgba(282828ee) text_color=rgba(f8f8f8ff) } } input { touchpad { tap-and-drag=true } kb_layout=custom kb_variant=dvorak } misc { background_color=rgb(181818) disable_hyprland_logo=true disable_splash_rendering=true force_default_wallpaper=0 key_press_enables_dpms=true mouse_move_enables_dpms=true } bind=$mod SHIFT, Return, exec, $terminal bind=$mod SHIFT, C, killactive, bind=$mod SHIFT, Q, exit, bind=$mod SHIFT, Space, togglefloating, bind=$mod, P, exec, $menu bind=$mod, Y, pseudo, # dwindle bind=$mod, F, togglesplit, # dwindle bind=$mod, t, togglegroup, bind=$mod, left, movefocus, l bind=$mod, right, movefocus, r bind=$mod, up, movefocus, u bind=$mod, down, movefocus, d bind=$mod, 1, workspace, 1 bind=$mod, 2, workspace, 2 bind=$mod, 3, workspace, 3 bind=$mod, 4, workspace, 4 bind=$mod, 5, workspace, 5 bind=$mod, 6, workspace, 6 bind=$mod, 7, workspace, 7 bind=$mod, 8, workspace, 8 bind=$mod, 9, workspace, 9 bind=$mod, 0, workspace, 10 bind=$mod SHIFT, 1, movetoworkspace, 1 bind=$mod SHIFT, 2, movetoworkspace, 2 bind=$mod SHIFT, 3, movetoworkspace, 3 bind=$mod SHIFT, 4, movetoworkspace, 4 bind=$mod SHIFT, 5, movetoworkspace, 5 bind=$mod SHIFT, 6, movetoworkspace, 6 bind=$mod SHIFT, 7, movetoworkspace, 7 bind=$mod SHIFT, 8, movetoworkspace, 8 bind=$mod SHIFT, 9, movetoworkspace, 9 bind=$mod SHIFT, 0, movetoworkspace, 10 bind=$mod, S, togglespecialworkspace, magic bind=$mod SHIFT, S, movetoworkspace, special:magic bind=$mod, mouse_down, workspace, e+1 bind=$mod, mouse_up, workspace, e-1 bindel=, XF86AudioRaiseVolume,exec, volumectl -u up bindel=, XF86AudioLowerVolume,exec, volumectl -u down bindel=, XF86MonBrightnessUp,exec, lightctl up bindel=, XF86MonBrightnessDown,exec, lightctl down bindl=, switch:on:Lid Switch, exec, /home/b/bin/lid_switch.sh on bindl=, switch:off:Lid Switch, exec, /home/b/bin/lid_switch.sh off bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow exec-once=hypridle exec-once=hyprpaper exec-once=waybar exec-once=/home/b/bin/monitor_events.sh monitor=eDP-1,preferred,0x0,1.56667 ======Config-End======== ```

Description

On NixOS with flake.nix / Home Manager (following the current Hyprland on Home Manager wiki page), Hyprland no longer builds if wayland.windowManager.hyprland.xwayland.enable = false

(I disable xwayland so apps that require it break instead of being blurry (fractional scaling woes), forcing me to find alternatives instead of suffer retinal damage.)

How to reproduce

Build fails: wayland.windowManager.hyprland.xwayland.enable = false;

Build works: wayland.windowManager.hyprland.xwayland.enable = true;

Crash reports, logs, images, videos

unning phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/547wkfx9pc0x8b05ddca3cq82vv3bx6x-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/fgnvwi3358w0759rwrx49i1f76wqvqag-stdcxx.patch
patching file CMakeLists.txt
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
fixing cmake files...
cmake flags: -GNinja -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/share/doc/hyprland -DCMAKE_INSTALL_INFODIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/b3f0yg2nc5vw7ngwrbipba901bxza8az-hyprland-0.42.0+date=2024-08-19_c86db7b-man/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/ci6pn6lzvrmw87c5mdcrz24w46wrrkxn-hyprland-0.42.0+date=2024-08-19_c86db7b-dev/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/ci6pn6lzvrmw87c5mdcrz24w46wrrkxn-hyprland-0.42.0+date=2024-08-19_c86db7b-dev/include -DCMAKE_INSTALL_SBINDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/css66g2h6v9g3w0jipx6xa8bw48wn2ks-gcc-wrapper-14.1.0/bin/strip -DCMAKE_RANLIB=/nix/store/css66g2h6v9g3w0jipx6xa8bw48wn2ks-gcc-wrapper-14.1.0/bin/ranlib -DCMAKE_AR=/nix/store/css66g2h6v9g3w0jipx6xa8bw48wn2ks-gcc-wrapper-14.1.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/30n2m34zzfi4y9qvfw96a3cp5nmmd34i-hyprland-0.42.0+date=2024-08-19_c86db7b -DNO_XWAYLAND:BOOL=TRUE -DLEGACY_RENDERER:BOOL=FALSE -DNO_SYSTEMD:BOOL=FALSE
-- The C compiler identification is GNU 14.1.0
-- The CXX compiler identification is GNU 14.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/css66g2h6v9g3w0jipx6xa8bw48wn2ks-gcc-wrapper-14.1.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/css66g2h6v9g3w0jipx6xa8bw48wn2ks-gcc-wrapper-14.1.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Gathering git info
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- Found Python3: /nix/store/04gg5w1s662l329a8kh9xcwyp0k64v5a-python3-3.12.4/bin/python3.12 (found version "3.12.4") found components: Interpreter
Building itab.c/itab.h...
-- Found PkgConfig: /nix/store/blb1ci2nwrmgzb3g1xl4mvqpwkhm3s3b-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Found wayland-protocols at //nix/store/6w627naapy17padgxzkn6w0yzdyjgjwr-wayland-protocols-1.36/share/wayland-protocols
-- Configuring Hyprland in Release with CMake
-- Checking deps...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenGL: /nix/store/lnqwj5a3rl82rp96kxzxqdhzvz98scwb-libglvnd-1.7.0/lib/libOpenGL.so  found components: GLES3
-- Checking for module 'hyprutils>=0.2.1'
--   Found hyprutils, version 0.2.1
-- Checking for modules 'aquamarine;xkbcommon;uuid;wayland-server;wayland-client;wayland-cursor;wayland-protocols;cairo;pango;pangocairo;pixman-1;xcursor;libdrm;libinput;hwdata;libseat;libdisplay-info;libliftoff;libudev;gbm;gio-2.0;hyprlang>=0.3.2;hyprcursor>=0.1.7;hyprutils>=0.2.1'
--   No package 'xcursor' found
CMake Error at /nix/store/sa1yjb7xxrzcbd1bysj3r561vidfxxvb-cmake-3.29.6/share/cmake-3.29/Modules/FindPkgConfig.cmake:634 (message):
  The following required packages were not found:

   - xcursor

Call Stack (most recent call first):
  /nix/store/sa1yjb7xxrzcbd1bysj3r561vidfxxvb-cmake-3.29.6/share/cmake-3.29/Modules/FindPkgConfig.cmake:862 (_pkg_check_modules_internal)
  CMakeLists.txt:97 (pkg_check_modules)

-- Configuring incomplete, errors occurred!
vaxerski commented 1 month ago

@fufexan

fufexan commented 1 month ago

Ah yeah that's my bad, I made Nix only include xcursor in the build if xwayland is enabled. This needs fixing in both the flake and the nixpkgs packages.

fufexan commented 1 month ago

Should be fixed by 1b1ecf77 for the flake package.

fufexan commented 1 month ago

The Nixpkgs fix will also be in nixos-unstable in a few days.