hyprwm / Hyprland

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

error building on NixOS #6634

Closed wolgamot closed 3 days ago

wolgamot commented 6 days ago

Regression?

No

System Info and Version

(No system info, I haven't gotten Hyprland to work yet)

Description

Hello, I am trying to switch from GNOME to Hyprland with NixOS flakes and running into a build error similar to that in #5891 but the fix there doesn't work (I was getting the same error before I added the "fix"). Any ideas?

How to reproduce

Run nixos-rebuild test --flake ./ with the following flake.nix:

Flake ``` { description = "nixos and home-manager config"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; }; outputs = { self, nixpkgs, home-manager, hyprland, ... }@inputs: { nixosConfigurations = { phanes = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ ./configuration.nix home-manager.nixosModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; users.dbw = import ./home.nix; extraSpecialArgs = { inherit inputs; }; }; } ]; }; }; }; } ```

Crash reports, logs, images, videos

Error ``` warning: Git tree '/etc/nixos' is dirty building the system configuration... warning: Git tree '/etc/nixos' is dirty error: builder for '/nix/store/8wi7mabmkjdid0sfla6i869pig1cw1z3-hyprland-0.41.1+date=2024-06-22_7f09646.drv' failed with exit code 1; last 10 log lines: > Could not find a configuration file for package "hyprwayland-scanner" that > is compatible with requested version "0.3.10". > > The following configuration files were considered but not accepted: > > /nix/store/r2ljnybnf491cpwpg8mr8nb056qg5ap5-hyprwayland-scanner-0.1.0+date=2024-05-13_65c2636/lib/cmake/hyprwayland-scanner/hyprwayland-scanner-config.cmake, version: 0.3.7 > > > > -- Configuring incomplete, errors occurred! For full logs, run 'nix log /nix/store/8wi7mabmkjdid0sfla6i869pig1cw1z3-hyprland-0.41.1+date=2024-06-22_7f09646.drv'. error: 1 dependencies of derivation '/nix/store/82rk4f4f6llxa94ww4r1314ilc75id13-desktops.drv' failed to build error: 1 dependencies of derivation '/nix/store/0qzj2wwhyh2r6g1gjz5qkj469w9gm4p6-hyprbars-0.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/yx0a1qiqmpzkjsr0qmrjw9f9m76bxb8x-system-path.drv' failed to build error: 1 dependencies of derivation '/nix/store/25bjw4mw6z09ajbwm8knacjwmsx19s6c-xdg-desktop-portal-hyprland-1.3.1.drv' failed to build error: 1 dependencies of derivation '/nix/store/jsjf4i9r7xx41hbjasvh242gggcnzmln-nixos-system-phanes-24.05.20240512.2057814.drv' failed to build ```
Full log ``` @nix { "action": "setPhase", "phase": "unpackPhase" } Running phase: unpackPhase unpacking source archive /nix/store/x8zwhgg1mxbhdfahfkxn4pivs8nk6b7y-source source root is source @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: patchPhase @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } Running phase: updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } Running 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/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/share/doc/Hyprland -DCMAKE_INSTALL_INFODIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/vw5zcm7val6z9v7m0c7w8mpz80jmhpwk-hyprland-0.41.1+date=2024-06-22_7f09646-man/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/z19f5yjvrgdhb63ccir6iyc3v49y3a9k-hyprland-0.41.1+date=2024-06-22_7f09646-dev/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/z19f5yjvrgdhb63ccir6iyc3v49y3a9k-hyprland-0.41.1+date=2024-06-22_7f09646-dev/include -DCMAKE_INSTALL_SBINDIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/k2k5qhqlnqk7sgc83qcnjnnv3r6pdazq-gcc-wrapper-13.2.0/bin/strip -DCMAKE_RANLIB=/nix/store/k2k5qhqlnqk7sgc83qcnjnnv3r6pdazq-gcc-wrapper-13.2.0/bin/ranlib -DCMAKE_AR=/nix/store/k2k5qhqlnqk7sgc83qcnjnnv3r6pdazq-gcc-wrapper-13.2.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/dl4ipsy6xipr0vinn2v2jlnn1ik8kxpj-hyprland-0.41.1+date=2024-06-22_7f09646 -DNO_XWAYLAND:BOOL=FALSE -DLEGACY_RENDERER:BOOL=FALSE -DNO_SYSTEMD:BOOL=FALSE -- The C compiler identification is GNU 13.2.0 -- The CXX compiler identification is GNU 13.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /nix/store/k2k5qhqlnqk7sgc83qcnjnnv3r6pdazq-gcc-wrapper-13.2.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/k2k5qhqlnqk7sgc83qcnjnnv3r6pdazq-gcc-wrapper-13.2.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/k3701zl6gmx3la7y4dnflcvf3xfy88kh-python3-3.11.9/bin/python3.11 (found version "3.11.9") found components: Interpreter Building itab.c/itab.h... -- Setting up wlroots -- Found PkgConfig: /nix/store/mil8a9jgadf9jjd4a9fw88l9kqxzdd49-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2") -- Found WaylandScanner at /nix/store/j2d9i3rsdnvrwrbygz8c7d7axyh6vqp3-wayland-1.22.0-bin/bin/wayland-scanner -- Found wayland-protocols at //nix/store/c6wxj7q369h7s17liacxbsldijq95rby-wayland-protocols-1.35/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/s2w3qaw28ch6z0ymahkbhv66fbwz8hbb-libGL-1.7.0/lib/libOpenGL.so found components: GLES3 -- Checking for modules 'xkbcommon;uuid;wayland-server;wayland-client;wayland-cursor;wayland-protocols;cairo;pango;pangocairo;pixman-1;libdrm;libinput;hwdata;libseat;libdisplay-info;libliftoff;libudev;gbm;hyprlang>=0.3.2;hyprcursor>=0.1.7;hyprutils>=0.1.4' -- Found xkbcommon, version 1.7.0 -- Found uuid, version 2.39.3 -- Found wayland-server, version 1.22.0 -- Found wayland-client, version 1.22.0 -- Found wayland-cursor, version 1.22.0 -- Found wayland-protocols, version 1.35 -- Found cairo, version 1.18.0 -- Found pango, version 1.52.2 -- Found pangocairo, version 1.52.2 -- Found pixman-1, version 0.43.4 -- Found libdrm, version 2.4.120 -- Found libinput, version 1.25.0 -- Found hwdata, version 0.382 -- Found libseat, version 0.8.0 -- Found libdisplay-info, version 0.1.1 -- Found libliftoff, version 0.4.1 -- Found libudev, version 255 -- Found gbm, version 24.0.6 -- Found hyprlang, version 0.5.1 -- Found hyprcursor, version 0.1.7 -- Found hyprutils, version 0.1.4 CMake Error at CMakeLists.txt:119 (find_package): Could not find a configuration file for package "hyprwayland-scanner" that is compatible with requested version "0.3.10". The following configuration files were considered but not accepted: /nix/store/r2ljnybnf491cpwpg8mr8nb056qg5ap5-hyprwayland-scanner-0.1.0+date=2024-05-13_65c2636/lib/cmake/hyprwayland-scanner/hyprwayland-scanner-config.cmake, version: 0.3.7 -- Configuring incomplete, errors occurred! ```
vaxerski commented 5 days ago

@fufexan for nix

fufexan commented 5 days ago

@wolgamot have you run nix flake update? CI builds fine, it also builds fine on my machine. Either your lockfile references an old commit, or there's something wrong in your config.

aftix commented 5 days ago

I'm also having the issue described trying to upgrade from v0.40.0 to v0.41.1 . I can change hyprland.url = "github:hyprwm/Hyprwm/v0.41.1?submodules=1" to hyprland.url = "git+https://github.com/hyprwm/Hyprland/?rev=9e781040d9067c2711ec2e9f5b47b76ef70762b3&submodules=1", specifying the revision SHA that the tag "v0.41.1" points to.

This fixes the build, but hyprland-plugins (pointed to the current top commit on main, with its hyprland input set to follow my flakes) no longer works (switching the new generation gives an error popup in hyprland that it can not load the two plugins I use, hyprbars and hyprexpo).

I ran nix flake update and even removed the lock file, running nix flake lock again to the same result.

EDIT: After a reboot the weird errors with the git+ input url went away (failed plugin loading, missing windowrulev2 syntax for window tags), and it seems I'm now on a working configuration for the current v0.41.1 tag

fufexan commented 4 days ago

@aftix hyprland plugins have been added to Nixpkgs, so use them from there (https://github.com/NixOS/nixpkgs/pull/321575). Should land in unstable in a few days (track here https://nixpk.gs/pr-tracker.html?pr=321575).

wolgamot commented 3 days ago

@wolgamot have you run nix flake update? CI builds fine, it also builds fine on my machine. Either your lockfile references an old commit, or there's something wrong in your config.

thank you, this solved the issue!