Change:
, wayland , wlroots , xcbutilcursor <ins> , pulseaudio </ins> }: <del> let unwrapped = python3Packages.buildPythonPackage rec { pname = "qtile"; version = "0.22.1"; </del> <ins> python3Packages.buildPythonPackage rec { pname = "qtile"; version = "0.22.1"; </ins> <del> src = fetchFromGitHub { owner = "qtile"; repo = "qtile"; rev = "v${version}"; hash = "sha256-HOyExVKOqZ4OeNM1/AiXQeiUV+EbSJLEjWEibm07ff8="; }; </del> <ins> src = fetchFromGitHub { owner = "qtile"; repo = "qtile"; rev = "v${version}"; hash = "sha256-HOyExVKOqZ4OeNM1/AiXQeiUV+EbSJLEjWEibm07ff8="; }; </ins> <del> patches = [ ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 ]; </del> <ins> patches = [ ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 ]; </ins> <del> postPatch = '' substituteInPlace libqtile/pangocffi.py  --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0  --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0  --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 substituteInPlace libqtile/backend/x11/xcursors.py  --replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0 ''; </del> <ins> postPatch = '' substituteInPlace libqtile/pangocffi.py  --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0  --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0  --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 substituteInPlace libqtile/backend/x11/xcursors.py  --replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0 ''; </ins> <del> SETUPTOOLS_SCM_PRETEND_VERSION = version; </del> <ins> SETUPTOOLS_SCM_PRETEND_VERSION = version; </ins> <del> nativeBuildInputs = [ pkg-config ] ++ (with python3Packages; [ setuptools-scm ]); </del> <ins> nativeBuildInputs = [ pkg-config ] ++ (with python3Packages; [ setuptools-scm ]); </ins> <del> propagatedBuildInputs = with python3Packages; [ xcffib (cairocffi.override { withXcffib = true; }) setuptools python-dateutil dbus-python dbus-next mpd2 psutil pyxdg pygobject3 pywayland pywlroots xkbcommon ]; </del> <ins> propagatedBuildInputs = with python3Packages; [ xcffib (cairocffi.override { withXcffib = true; }) setuptools python-dateutil dbus-python dbus-next mpd2 psutil pyxdg pygobject3 pywayland pywlroots xkbcommon pulseaudio ]; </ins> <del> buildInputs = [ libinput wayland wlroots libxkbcommon ]; </del> <ins> buildInputs = [ libinput wayland wlroots libxkbcommon ]; </ins> <del> # for `qtile check`, needs `stubtest` and `mypy` commands makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ mypy ]}" ]; </del> <ins> # for `qtile check`, needs `stubtest` and `mypy` commands makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ mypy ]}" ]; </ins> <del> doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure. </del> <ins> doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure. </ins> <del> meta = with lib; { homepage = "http://www.qtile.org/"; license = licenses.mit; description = "A small, flexible, scriptable tiling window manager written in Python"; platforms = platforms.linux; maintainers = with maintainers; [ kamilchm ]; }; </del> <ins> meta = with lib; { homepage = "http://www.qtile.org/"; license = licenses.mit; description = "A small, flexible, scriptable tiling window manager written in Python"; platforms = platforms.linux; maintainers = with maintainers; [ kamilchm arjan-s ]; </ins> }; <del> in (python3.withPackages (_: [ unwrapped ])).overrideAttrs (_: { # otherwise will be exported as "env", this restores `nix search` behavior name = "${unwrapped.pname}-${unwrapped.version}"; # export underlying qtile package passthru = { inherit unwrapped; }; # restore original qtile attrs inherit (unwrapped) pname version meta; }) </del> <ins> } </ins>

Discussion:
Qtile is missing all the ffi modules so one can't use the pulse widget Just install qtile and add a To the config There is a script that has to be run as part of the packaging process takes care of creating the ffi modules, not sure if that will be enough or patching to change the paths will also be required.
Problem still here, and only for this module