Waypaper not working on NixOS
Installed waypaper on NixOS. When starting waypaper from the command line, I get the following error messages:
❯ waypaper
Traceback (most recent call last):
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/bin/.waypaper-wrapped", line 6, in <module>
from waypaper.__main__ import run
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/lib/python3.13/site-packages/waypaper/__main__.py", line 10, in <module>
from waypaper.app import App
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/lib/python3.13/site-packages/waypaper/app.py", line 12, in <module>
from waypaper.changer import change_wallpaper
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/lib/python3.13/site-packages/waypaper/changer.py", line 9, in <module>
from waypaper.config import Config
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/lib/python3.13/site-packages/waypaper/config.py", line 9, in <module>
from waypaper.options import FILL_OPTIONS, SORT_OPTIONS, SWWW_TRANSITION_TYPES, BACKEND_OPTIONS
File "/nix/store/pxm7i541l4cc7hqj99r1jagm7b03v5mc-waypaper-2.6/lib/python3.13/site-packages/waypaper/options.py", line 10, in <module>
MONITOR_OPTIONS: List[str] = [m.name for m in get_monitors()]
~~~~~~~~~~~~^^
File "/nix/store/qgdzyyvcf8ibwbv5m1j55dff64j5l599-python3.13-screeninfo-0.8.1/lib/python3.13/site-packages/screeninfo/screeninfo.py", line 32, in get_monitors
raise ScreenInfoError("No enumerators available")
screeninfo.common.ScreenInfoError: No enumerators available
Any idea how to fix this. Is there a package missing?
Thanks in advance.
Hmm, looks like another weird error with screeninfo library 🫤 We have recently made some guarding against screeninfo nonsense in the git version but not at this place. I think it should be so that it defaults to All monitors should any issue arise.
Anyways, is it recent or it was always like that?
Hmm, looks like another weird error with screeninfo library 🫤 We have recently made some guarding against screeninfo nonsense in the git version but not at this place. I think it should be so that it defaults to All monitors should any issue arise.
Anyways, is it recent or it was always like that?
I am currently preparing the ML4W Dotfiles for nix. And waypaper is the only component that's currently not working.
Also tried to install it with pipx. Was able to intall all dependencies to compile but can't fix this error.
❯ pipx install waypaper
Fatal error from pip prevented installation. Full pip output in file:
/home/raabe/.local/state/pipx/log/cmd_2025-09-03_16.20.50_pip_errors.log
pip seemed to fail to build package:
PyGObject
Some possibly relevant errors from pip install:
error: subprocess-exited-with-error
../cairo/meson.build:31:12: ERROR: Dependency "cairo" not found, tried pkgconfig
error: metadata-generation-failed
Error installing waypaper.
For this error that some people experience, some reported that installing cairo-gobject-devel or cairo-devel might help. In any case, it seems to be issue with cairo library
Yes. Found this recommendation already but wasn't able to find the packages on Nix. Will check again.
I just reimplemented monitor detection in such a way that screeninfo is not imported by default and swww and hyprpaper backends don't use it, so hopefully it will partly resolve this issue.
I just reimplemented monitor detection in such a way that screeninfo is not imported by default and swww and hyprpaper backends don't use it, so hopefully it will partly resolve this issue.
Great. Thanks you.
By the way, I noticed that on NixOS, waypaper is already 2 versions old in the stable. @Prince213 @totalchaos05 Could you please update on occasion? Thanks a lot for the package!
Sorry about that, I don't check github as often as I should. Was there another dependency issue that needed to be fixed or should I just update the package?
The current PR for the package update is https://github.com/NixOS/nixpkgs/pull/447914
No, there are no dependency issues, I think. There's strange behavior with the screeninfo library, but it doesn't look like something we can fix. Thank you very much for your work!
I patched this in #176. I also opened a PR in nixpkgs a few days ago that has the fix included.
@mylinuxforwork waypaper v2.7 is now available in the nixos-unstable channel. You shouldn't get this error anymore.
@mylinuxforwork waypaper v2.7 is now available in the
nixos-unstablechannel. You shouldn't get this error anymore.
Thanks. I will test.