hplip: use wrapQtApp
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 ```
This commit is contained in:
parent
88f749545c
commit
907353b1e4
1 changed files with 9 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
, net-snmp, openssl, perl, nettools
|
, net-snmp, openssl, perl, nettools
|
||||||
, bash, coreutils, utillinux
|
, bash, coreutils, utillinux
|
||||||
# To remove references to gcc-unwrapped
|
# To remove references to gcc-unwrapped
|
||||||
, removeReferencesTo
|
, removeReferencesTo, qt5
|
||||||
, withQt5 ? true
|
, withQt5 ? true
|
||||||
, withPlugin ? false
|
, withPlugin ? false
|
||||||
, withStaticPPDInstall ? false
|
, withStaticPPDInstall ? false
|
||||||
|
@ -67,7 +67,10 @@ python3Packages.buildPythonApplication {
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig removeReferencesTo ];
|
nativeBuildInputs = [
|
||||||
|
pkgconfig
|
||||||
|
removeReferencesTo
|
||||||
|
] ++ stdenv.lib.optional withQt5 qt5.wrapQtAppsHook;
|
||||||
|
|
||||||
pythonPath = with python3Packages; [
|
pythonPath = with python3Packages; [
|
||||||
dbus
|
dbus
|
||||||
|
@ -219,6 +222,10 @@ python3Packages.buildPythonApplication {
|
||||||
--replace {,${utillinux}/bin/}logger \
|
--replace {,${utillinux}/bin/}logger \
|
||||||
--replace {/usr,$out}/bin
|
--replace {/usr,$out}/bin
|
||||||
remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so)
|
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
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# There are some binaries there, which reference gcc-unwrapped otherwise.
|
# There are some binaries there, which reference gcc-unwrapped otherwise.
|
||||||
|
|
Loading…
Reference in a new issue