KZDKM / Hyprspace

Workspace overview plugin for Hyprland
GNU General Public License v2.0
523 stars 16 forks source link

Fails to build on NixOS #60

Closed Soliprem closed 4 months ago

Soliprem commented 5 months ago

This is the error that I get from running home-manager switch --flake <flake/path>#user@hostname


       last 10 log lines:
       >       |                        getWorkspaceIDNameFromString
       > [2/6] Compiling C++ object libHyprspace.so.p/src_Layout.cpp.o
       > [3/6] Compiling C++ object libHyprspace.so.p/src_Overview.cpp.o
       > [4/6] Compiling C++ object libHyprspace.so.p/src_Render.cpp.o
       > ../src/Render.cpp: In member function 'void CHyprspaceWidget::draw()':
       > ../src/Render.cpp:117:247: warning: narrowing conversion of 'Config::panelBorderWidth' from 'int' to 'double' [-Wnarrowing]
       >   117 |         CBox borderBox = {widgetBox.x, owner->vecPosition.y + (Config::onBottom * owner->vecTransformedSize.y) + (Config::panelHeight + Config::reservedArea - curYOffset.value()* owner->scale) * bottomInvert, owner->vecTransformedSize.x, Config::panelBorderWidth};
       >       |                                                                                                                                                                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~
       > [5/6] Compiling C++ object libHyprspace.so.p/src_main.cpp.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/3hk2g9g52v1d85d0jy4wpd9dmxfb9b30-Hyprspace-0.1+date=2024-06-17_2f3edb6.drv'.
error: 1 dependencies of derivation '/nix/store/gch402j4gg15jcc88jg79w8z37mg04y3-hm_hyprhyprland.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ip0p4gnp30z7l5d4569ajf5igvr9lh66-activation-script.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1jfyxni24acgz3ir27rim8ssvz155pp7-home-manager-generation.drv' failed to build```
cootshk commented 4 months ago

I'm getting the same error trying to build hyprspace

cootshk commented 4 months ago

my full log:

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/8gq8q6knn3iv9705qb49h0g1aqfyxz2s-ngp037bikjcnvzy284fl9ncla43m3l1f-source
source root is ngp037bikjcnvzy284fl9ncla43m3l1f-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
mesonConfigurePhase flags: --prefix=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6 --libdir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/lib --libexecdir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/libexec --bindir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/bin --sbindir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/sbin --includedir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/include --mandir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/man --infodir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/info --localedir=/nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain
The Meson build system
Version: 1.4.0
Source dir: /build/ngp037bikjcnvzy284fl9ncla43m3l1f-source
Build dir: /build/ngp037bikjcnvzy284fl9ncla43m3l1f-source/build
Build type: native build
Project name: Hyprspace
Project version: 0.1
C++ compiler for the host machine: g++ (gcc 13.3.0 "g++ (GCC) 13.3.0")
C++ linker for the host machine: g++ ld.bfd 2.41
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports arguments -std=c++23: YES 
meson.build:8: WARNING: Consider using the built-in option for language standard version instead of using "-std=c++23".
Found pkg-config: YES (/nix/store/2hfzaqv42iwrpk3ya24cnjsklz6f68lw-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency hyprland found: YES 0.41.2
Run-time dependency pixman-1 found: YES 0.43.4
Run-time dependency libdrm found: YES 2.4.120
Build targets in project: 1

Hyprspace 0.1

  User defined options
    auto_features: enabled
    bindir       : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/bin
    buildtype    : plain
    includedir   : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/include
    infodir      : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/info
    libdir       : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/lib
    libexecdir   : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/libexec
    localedir    : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/locale
    mandir       : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/share/man
    prefix       : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6
    sbindir      : /nix/store/7wcv642rbycbdr074lycl2bqn29qlk5q-Hyprspace-0.1+date=2024-06-17_2f3edb6/sbin
    wrap_mode    : nodownload

Found ninja-1.12.1 at /nix/store/v3wh3z7j8dxlb3306ackf25h8hw7lzg2-ninja-1.12.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
build flags: -j24
[1/6] Compiling C++ object libHyprspace.so.p/src_Input.cpp.o
FAILED: libHyprspace.so.p/src_Input.cpp.o 
g++ -IlibHyprspace.so.p -I. -I.. -I/nix/store/wqfar0hyz565qq0c1i1qarpihr96f9lg-hyprland-0.41.2+date=2024-06-27_b7f42a1-dev/include -I/nix/store/wqfar0hyz565qq0c1i1qarpihr96f9lg-hyprland-0.41.2+date=2024-06-27_b7f42a1-dev/include/hyprland/protocols -I/nix/store/wqfar0hyz565qq0c1i1qarpihr96f9lg-hyprland-0.41.2+date=2024-06-27_b7f42a1-dev/include/hyprland -I/nix/store/wqfar0hyz565qq0c1i1qarpihr96f9lg-hyprland-0.41.2+date=2024-06-27_b7f42a1-dev/include/hyprland/wlr -I/nix/store/avzjkq3q95vjisfpx018ff8l9zlxn9hf-pixman-0.43.4/include/pixman-1 -I/nix/store/5f2704za85mzq80m18pb6bc7fy77bzsg-libdrm-2.4.120-dev/include -I/nix/store/5f2704za85mzq80m18pb6bc7fy77bzsg-libdrm-2.4.120-dev/include/libdrm -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -DWLR_USE_UNSTABLE -std=c++23 -fPIC -MD -MQ libHyprspace.so.p/src_Input.cpp.o -MF libHyprspace.so.p/src_Input.cpp.o.d -o libHyprspace.so.p/src_Input.cpp.o -c ../src/Input.cpp
../src/Input.cpp: In member function 'bool CHyprspaceWidget::axisEvent(double, Hyprutils::Math::Vector2D)':
../src/Input.cpp:92:24: error: 'getWorkspaceIDFromString' was not declared in this scope; did you mean 'getWorkspaceIDNameFromString'?
   92 |             int wsID = getWorkspaceIDFromString("r-1", outName);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                        getWorkspaceIDNameFromString
../src/Input.cpp:98:24: error: 'getWorkspaceIDFromString' was not declared in this scope; did you mean 'getWorkspaceIDNameFromString'?
   98 |             int wsID = getWorkspaceIDFromString("r+1", outName);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                        getWorkspaceIDNameFromString
[2/6] Compiling C++ object libHyprspace.so.p/src_Render.cpp.o
../src/Render.cpp: In member function 'void CHyprspaceWidget::draw()':
../src/Render.cpp:117:247: warning: narrowing conversion of 'Config::panelBorderWidth' from 'int' to 'double' [-Wnarrowing]
  117 |         CBox borderBox = {widgetBox.x, owner->vecPosition.y + (Config::onBottom * owner->vecTransformedSize.y) + (Config::panelHeight + Config::reservedArea - curYOffset.value()* owner->scale) * bottomInvert, owner->vecTransformedSize.x, Config::panelBorderWidth};
      |                                                                                                                                                                                                                                               ~~~~~~~~^~~~~~~~~~~~~~~~
[3/6] Compiling C++ object libHyprspace.so.p/src_Overview.cpp.o
[4/6] Compiling C++ object libHyprspace.so.p/src_Layout.cpp.o
[5/6] Compiling C++ object libHyprspace.so.p/src_main.cpp.o
ninja: build stopped: subcommand failed.
Soliprem commented 4 months ago

gets fixed by #62

Soliprem commented 4 months ago

until #62 is merged, you can just place the MR's url as an input and it will work (or at least it did for me)

Soliprem commented 4 months ago

Fixed by #62 being merged