Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load plugin using home manager #37

Closed
stellarhoof opened this issue Oct 9, 2023 · 5 comments
Closed

Cannot load plugin using home manager #37

stellarhoof opened this issue Oct 9, 2023 · 5 comments

Comments

@stellarhoof
Copy link

Here's a minimal nix flake

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    hyprland.url = "github:hyprwm/Hyprland?ref=v0.30.0";
    hy3.url = "github:outfoxxed/hy3?ref=hl0.30.0";
    hy3.inputs.hyprland.follows = "hyprland";
  };
  outputs = { self, nixpkgs, home-manager, hyprland, hy3 }: {
    homeConfigurations."ah@framework" =
      home-manager.lib.homeManagerConfiguration {
        pkgs = import nixpkgs { system = "x86_64-linux"; };
        modules = [
          hyprland.homeManagerModules.default
          {
            home.stateVersion = "23.05";
            home.username = "ah";
            home.homeDirectory = "/home/ah";
            wayland.windowManager.hyprland.enable = true;
            wayland.windowManager.hyprland.plugins =
              [ hy3.packages.x86_64-linux.hy3 ];
          }
        ];
      };
  };
}

Upon rebuilding my system with home-manager switch I get the following error

Failed to load the following plugins: /nix/store/<etc...>/lib/libhy3.so

1696824349-wayshot

@outfoxxed
Copy link
Owner

outfoxxed commented Oct 9, 2023

are you actually running hyprland v0.30.0, additionally are you running hyprland v0.30.0 from nix, or something else

@stellarhoof
Copy link
Author

Nevermind, it works now. I had to override the hyprland package like this since I'm using the default home-manager module instead of the hyprland provided home manager module.

wayland.windowManager.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;

Perhaps that can be added to the readme?

@felixsanz
Copy link

felixsanz commented Oct 10, 2023

@outfoxxed i have the same issue but can't get it to work. I think my setup is correct because i can see inside hyprland.conf this line:

plugin=/nix/store/9ws3i38almwmysa37vbk0pwqmvmfmjy0-hy3-0.1/lib/libhy3.so

And also the file exists and all is ok, but i'm still getting that red error message about "failed to load the following plugins".

I'm using Hyprland, built from branch at commit v0.30.0 (). and hy3 version hl0.30.0.

Any idea? Thx.


EDIT: I was pulling from master, instead you have to target the specific release:

hyprland.url = "github:hyprwm/Hyprland?ref=v0.30.0";
hy3 = {
  url = "github:outfoxxed/hy3?ref=hl0.30.0"
  inputs.hyprland.follows = "hyprland";
};

@rachitve6h2g
Copy link

The nixpkgs version says the same thing. I just used a simple

wayland.windowManager.hyprland.plugins = with pkgs.hyprlandPlugins; [ hy3 ];

And the git version fails to build with this as the error:
follows 'hyprland'
building the system configuration...
[1/13/23 built, 61 copied (249.0/249.3 MiB), 53.9 MiB DL] building hyprland-0.42.0+dchris➜nixos/home/Hyprland» update [1:15:53]
[sudo] password for chris:
building the system configuration...
error: builder for '/nix/store/wgv4pmv912pcirxrn0adlp3iil37k4wj-hy3-hl0.42.0.drv' faRunning 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_P
ACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=RelWith
DebInfo -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/rl5l8qxh1bfrplj86bg
zapfjvfl6jm10-hy3-hl0.42.0/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/rl5l8q
xh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/rl
5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/rl
5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/share/doc/Hy3 -DCMAKE_INSTALL_INFODIR=/n
ix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/share/info -DCMAKE_INSTALL_MA
NDIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/share/man -DCMAKE_INST
ALL_OLDINCLUDEDIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/include -
DCMAKE_INSTALL_INCLUDEDIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0/i
nclude -DCMAKE_INSTALL_SBINDIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.4
2.0/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.
42.0/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl
0.42.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAM
EWORK=LAST -DCMAKE_STRIP=/nix/store/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wrapper-13.
3.0/bin/strip -DCMAKE_RANLIB=/nix/store/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wrapper
-13.3.0/bin/ranlib -DCMAKE_AR=/nix/store/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wrappe
r-13.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREF
IX=/nix/store/rl5l8qxh1bfrplj86bgzapfjvfl6jm10-hy3-hl0.42.0
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wra
pper-13.3.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/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wrapper-13.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /nix/store/fcmc82gp5qc0s8qvcw4c0w46c67zd295-pkg-config-wrapper-0.29.2/bin/pkg-config (found version "0.29.2")
-- Checking for modules 'hyprland;pixman-1;libdrm;pango;pangocairo;libinput;wayland-client;xkbcommon'
-- Found hyprland, version 0.42.0
-- Found pixman-1, version 0.43.4
-- Found libdrm, version 2.4.122
-- Found pango, version 1.52.2
-- Found pangocairo, version 1.52.2
-- Found libinput, version 1.26.1
-- Found wayland-client, version 1.23.0
-- Found xkbcommon, version 1.7.0
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing libpcre2-8.pc' to the PKG_CONFIG_PATH environment variable Package 'libpcre2-8', required by 'glib-2.0', not found Package libpcre2-8 was not found in the pkg-config search path. Perhaps you should add the directory containing libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing libpcre2-8.pc' to the PKG_CONFIG_PATH environment variable Package 'libpcre2-8', required by 'glib-2.0', not found Package libpcre2-8 was not found in the pkg-config search path. Perhaps you should add the directory containing libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
-- Configuring done (1.0s)
-- Generating done (0.0s)
CMake Warning:
Manually-specified variables were not used by the project:

BUILD_TESTING
CMAKE_EXPORT_NO_PACKAGE_REGISTRY
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_DOCDIR
CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_INFODIR
CMAKE_INSTALL_LIBEXECDIR
CMAKE_INSTALL_LOCALEDIR
CMAKE_INSTALL_MANDIR
CMAKE_INSTALL_OLDINCLUDEDIR
CMAKE_INSTALL_SBINDIR
CMAKE_POLICY_DEFAULT_CMP0025

-- Build files have been written to: /build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/build
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j8
[1/7] Building CXX object CMakeFiles/hy3.dir/src/Hy3Layout.cpp.o
FAILED: CMakeFiles/hy3.dir/src/Hy3Layout.cpp.o
/nix/store/gxpdysvlj9l6bfin03k6yq0s922pk7pg-gcc-wrapper-13.3.0/bin/g++ -DWLR_USE_UNSTABLE -Dhy3_EXPORTS -I/nix/store/hqbvjd7j52k472x0195bvkjzlx4yhm7n-hyprland-0.42.0+date=2024-09-03_9b54342-dev/include/hyprland/protocols -I/nix/store/hqbvjd7j52k472x0195bvkjzlx4yhm7n-hyprland-0.42.0+date=2024-09-03_9b54342-dev/include/hyprland -I/nix/store/nllmigbwkb9zm0hakz4j74vbmvl1wwzb-pango-1.52.2-dev/include/pango-1.0 -I/nix/store/mgqcjlibhz6kjhc3lxh4mb1srd2vcm6v-cairo-1.18.0-dev/include/cairo -I/nix/store/4v6g5ssa7pzwfjn6nvfbrhw32h8ll8l1-glib-2.80.4-dev/include/glib-2.0 -I/nix/store/d1jna110cihfr8024bgb504r5pvamrnv-glib-2.80.4/lib/glib-2.0/include -I/nix/store/zvwyb6yjlg302g9
7pkcx7dfqkawx5pkp-harfbuzz-9.0.0-dev/include/harfbuzz -I/nix/store/kxqcbxk6ha8smyyhp3a0k7xgyi4365s4-libdrm-2.4.122-dev/include/libdrm -O2 -g -DNDEBUG -std=gnu++23 -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith -MD -MT CMakeFiles/hy3.dir/src/Hy3Layout.cpp.o -MF CMakeFiles/hy3.dir/src/Hy3Layout.cpp.o.d -o CMakeFiles/hy3.dir/src/Hy3Layout.cpp.o -c /build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Layout.cpp
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Layout.cpp: In member function 'virtual PHLWINDOW Hy3Layout::getNextWindowCandidate(PHLWINDOW)':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Layout.cpp:624:88: error: 'class CWindow' has no member named 'm_iX11Type'
624 | if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && w->m_iX11Type != 2
| ^~~~~~~~~~
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Layout.cpp: In member function 'bool Hy3Layout::shouldRenderSelected(const PHLWINDOW&)':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Layout.cpp:1386:1: warning: control reaches end of non-void function [-Wreturn-type]
1386 | }
| ^
[2/7] Building CXX object CMakeFiles/hy3.dir/src/TabGroup.cpp.o
[3/7] Building CXX object CMakeFiles/hy3.dir/src/main.cpp.o
[4/7] Building CXX object CMakeFiles/hy3.dir/src/SelectionHook.cpp.o
[5/7] Building CXX object CMakeFiles/hy3.dir/src/dispatchers.cpp.o
[6/7] Building CXX object CMakeFiles/hy3.dir/src/Hy3Node.cpp.o
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp: In member function 'PHLWINDOW Hy3Node::bringToTop()':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp:212:1: warning: control reaches end of non-void function [-Wreturn-type]
212 | }
| ^
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp: In member function 'Hy3Node* Hy3Node::getFocusedNode(bool, bool)':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp:275:1: warning: control reaches end of non-void function [-Wreturn-type]
275 | }
| ^
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp: In member function '
bool Hy3Node::isUrgent()':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp:618:1: warning: control reaches end of non-void function [-Wreturn-type]
618 | }
| ^
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp: In member function 'void Hy3Node::recalcSizePosRecursive(bool)':
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp:379:71: warning: 'constraint' may be used uninitialized [-Wmaybe-uninitialized]
379 | group.layout != Hy3GroupLayout::Tabbed ? child_count <= 0 ? 0 : constraint / child_count : 0;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/zh0di7gakw57psbk9xb574aldvk7x3k7-source/src/Hy3Node.cpp:360:16: note: 'constraint' was declared here
360 | double constraint;
| ^~~~~~~~~~
ninja: build stopped: subcommand failed.

@outfoxxed
Copy link
Owner

Fixed yesterday. not sure why this issue was open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants