-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
hplip: Fix missing library #90609
hplip: Fix missing library #90609
Conversation
CC @flokli |
@bkchr Thanks for the PR! Can you elaborate a bit in how this fails? I was actually able to build this, so I'm curious… |
Like this? https://hydra.nixos.org/build/122332330 |
Sorry, I should have made it clear. It builds, but it fails at running hp-setup for example. Other commands probably fail as well. |
Otherwise, things like `hp-setup` fail finding gi: ``` HP Linux Imaging and Printing System (ver. 3.20.5) Printer/Fax Setup Utility ver. 9.0 Copyright (c) 2001-18 HP Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. Traceback (most recent call last): File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/setup.py", line 314, in <module> ui = import_module(ui_package + ".setupdialog") File "/nix/store/n0b076p351ma864q38if4yglsg99hw2s-python3-3.8.3/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/ui5/setupdialog.py", line 31, in <module> from base import device, utils, models, pkit File "/nix/store/rmzq8c4n47s4q4p31w18waz0zrba2ljl-hplip-3.20.5/share/hplip/base/pkit.py", line 38, in <module> from gi import _gobject as gobject ModuleNotFoundError: No module named 'gi' ```
Otherwise, things like hp-setup segfault if you run them from another nixpkgs checkout: ``` HP Linux Imaging and Printing System (ver. 3.20.5) Printer/Fax Setup Utility ver. 9.0 Copyright (c) 2001-18 HP Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details. qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. [1] 4543 abort (core dumped) result/bin/hp-setup ```
Hmm, even with that patch, running the application (from another nixpkgs checkout) fails, as the QT stuff isn't wrapped:
|
I updated the commit message to include some more detail, and pushed a second commit doing the qt wrapping for the hplip binaries. PTAL. |
Hmm. @flokli you probably not use KDE? That is maybe the reason why I did not get the problems with QT. |
Nah, the problem can also happen in other cases, too: #65399 |
@@ -219,6 +222,10 @@ python3Packages.buildPythonApplication { | |||
--replace {,${utillinux}/bin/}logger \ | |||
--replace {/usr,$out}/bin | |||
remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so) | |||
'' + stdenv.lib.optionalString withQt5 '' | |||
for f in $out/bin/hp-*;do | |||
wrapQtApp $f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm pretty sure the binaries are wrapped twice now. It should have been:
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
''
But it's not that bad...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, if someone wants to clean this up, I'd happily review a PR, but don't feel it a pressing enough issue to do it myself :-)
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)