HP Printer installation failure

My printer requires using hplipWithPlugin and I followed the this guide. However, when I run:

nix run nixpkgs.hplipWithPlugin -c sudo hp-setup

I get:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
Searching… (bus=usb, search=(None), desc=0)
error: Unable to load Qt4 support. Is it installed?
Traceback (most recent call last):
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/ui5/setupdialog.py”, line 1297, in NextButton_clicked
self.showDevicesPage()
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/ui5/setupdialog.py”, line 562, in showDevicesPage
smart_install.disable(GUI_MODE, ‘qt4’)
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/base/smart_install.py”, line 236, in disable
dialog.exec_()
AttributeError: ‘NoneType’ object has no attribute ‘exec_’
Aborted

When I run:

nix run nixpkgs.hplipWithPlugin -c sudo hp-check

The result is:

Traceback (most recent call last):
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/base/password.py”, line 85, in get_distro_name
os_name = platform.dist()[0]
AttributeError: module ‘platform’ has no attribute ‘dist’
During handling of the above exception, another exception occurred
Traceback (most recent call last):
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/check.py”, line 861, in
dep = DependenciesCheck(MODE_CHECK,INTERACTIVE_MODE,ui_toolkit)
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/check.py”, line 176, in _init
self.core = CoreInstall(mode, ui_mode, ui_toolkit)
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/installer/core_install.py”, line 240, in __init
self.passwordObj = password.Password(ui_mode)
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/base/password.py”, line 118, in __init
self.__readAuthType() # self.__authType
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/base/password.py”, line 141, in __readAuthType
distro_name = get_distro_name().lower().replace(" “,”")
File “/nix/store/f1byld6l04bvnp2xj6p1s4dbcv3n5w6i-hplip-3.20.5/share/hplip/base/password.py”, line 87, in get_distro_name
import distro
ModuleNotFoundError: No module named 'distro’

The Qt error appeared after I played with that for couple of hours. In the beginning it was failing when downloading the driver and then with the missing module.

system: “x86_64-linux”, multi-user?: yes, version: nix-env (Nix) 2.3.9, channels(root): “nixos-20.09.2238.b94726217f7”, channels(me): “”, nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Any ideas?

– best