hyprwm / hyprland-plugins

Official plugins for Hyprland
BSD 3-Clause "New" or "Revised" License
459 stars 42 forks source link

Compliation fails on NixOS #160

Closed wikiker closed 1 week ago

wikiker commented 2 months ago

Similar issue to #158.

I need to pin Hyprland version 0.39.1, because of the Hyprspace plugin (see the issue). I think due to this hyprbars won't build, resulting in this error:

building the system configuration...
error: builder for '/nix/store/5lq60s87r8x3kyyh8ljn7f224wrrzada-hyprbars-0.1.drv' failed with exit code 1;
       last 10 log lines:
       >    59 |     CWindow* m_pWindow = nullptr;
       >       |              ^~~~~~~~~
       > ../barDeco.cpp:525:36: error: request for member 'lock' in '((CHyprBar*)this)->CHyprBar::<anonymous>.IHyprWindowDecoration::m_pWindow', which is of pointer type 'CWindow*' (maybe you meant to use '->' ?)
       >   525 |     const auto PWINDOW = m_pWindow.lock();
       >       |                                    ^~~~
       > ../barDeco.cpp: At global scope:
       > ../barDeco.cpp:536:1: error: 'PHLWINDOW' does not name a type
       >   536 | PHLWINDOW CHyprBar::getOwner() {
       >       | ^~~~~~~~~
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/5lq60s87r8x3kyyh8ljn7f224wrrzada-hyprbars-0.1.drv'.
error: 1 dependencies of derivation '/nix/store/26117f1kd8b75nz748a4l81nrdyic86l-hm_hyprhyprland.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k8nccm5pl7jibcr08vqv8x8dcb1b7lrq-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j4aznn3a4aybyzprkq7a14p04h3b5x9n-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6qr3s2zi7pr6kdhdy0flwwncbnwdbv58-unit-home-manager-wikiker.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9dz2fq1qfzr5w5c2qx4dx4p3m30s48cq-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/060yng71dvc7j9dcv3zyhz8k6b1ws2h0-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l1zy33rkh5fnfi4k6fnp80g9v0g6l42v-nixos-system-teispes-23.11.20240428.12430e4.drv' failed to build

The flake inputs setup looks like this:

    inputs = {
        nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
        unstable.url = "github:nixos/nixpkgs/nixos-unstable";

        home-manager = {
            url = "github:nix-community/home-manager/release-23.11";
            inputs.nixpkgs.follows = "nixpkgs";
        };

        hyprland = {
            url = "github:hyprwm/Hyprland/v0.39.1";
            inputs.nixpkgs.follows = "unstable";
        };

        hyprland-plugins = {
            url = "github:hyprwm/hyprland-plugins";
            inputs.hyprland.follows = "hyprland";
        };

        Hyprspace = {
            url = "github:KZDKM/Hyprspace";
            inputs.hyprland.follows = "hyprland";
        };

        nixvim = {
            url = "github:nix-community/nixvim";
            inputs.nixpkgs.follows = "unstable";
        };
    };

Is there problem in version mismatch as well?

vaxerski commented 2 months ago

@fufexan for nix. Generally looks like mismatched headers

fufexan commented 2 months ago

No clue, try updating all of hyprland's inputs.

cryptoboy22 commented 1 month ago

Hi I was wondering if the OP had any luck with this? I am getting what looks like the same error. Hyprland plugins will not compile, could anybody help? Should I be installing the headers or would they get installed by the system? I did get hyprexpo to compile but it wouldn't start because of a mismatch between version and headers. now it won't compile. building '/nix/store/z5fcv6xfxc8rm08iq6van5yqgnic4j1l-hyprexpo-0.1.drv'...

error: builder for '/nix/store/z5fcv6xfxc8rm08iq6van5yqgnic4j1l-hyprexpo-0.1.drv' failed with exit code 1; last 10 log lines:

../main.cpp:193:17: warning: unused variable 'P2' [-Wunused-variable] 193 | static auto P2 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "swipeBegin", [](void self, SCallbackInfo& info, std::any data) { swipeBegin(self, info, data); }); | ^~ ../main.cpp:194:17: warning: unused variable 'P3' [-Wunused-variable] 194 | static auto P3 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "swipeEnd", [](void self, SCallbackInfo& info, std::any data) { swipeEnd(self, info, data); }); | ^~ ../main.cpp:195:17: warning: unused variable 'P4' [-Wunused-variable] 195 | static auto P4 = HyprlandAPI::registerCallbackDynamic(PHANDLE, "swipeUpdate", [](void* self, SCallbackInfo& info, std::any data) { swipeUpdate(self, info, data); }); | ^~ ninja: build stopped: subcommand failed.

any ideas?

cheers

fufexan commented 1 week ago

This was probably fixed. Also, hyprland-plugins are now in Nixpkgs https://github.com/NixOS/nixpkgs/pull/321575.