qutebrowser: add wrapQtAppsHook

This commit fixes the error:

Could not find the Qt platform plugin "xcb" in ""

Closes #65895
This commit is contained in:
Emmanuel Rosa 2019-07-17 16:20:06 +07:00 committed by Emmanuel Rosa
parent 525eaf407d
commit f9ed3a6754

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, fetchzip, python3Packages { stdenv, lib, fetchurl, fetchzip, python3Packages
, makeWrapper, wrapGAppsHook, qtbase, glib-networking , mkDerivationWith, wrapQtAppsHook, wrapGAppsHook, qtbase, glib-networking
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2 , asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2
, libxslt, gst_all_1 ? null , libxslt, gst_all_1 ? null
, withPdfReader ? true , withPdfReader ? true
@ -19,7 +19,7 @@ let
stripRoot = false; stripRoot = false;
}; };
in python3Packages.buildPythonApplication rec { in mkDerivationWith python3Packages.buildPythonApplication rec {
pname = "qutebrowser"; pname = "qutebrowser";
version = "1.6.3"; version = "1.6.3";
@ -41,7 +41,7 @@ in python3Packages.buildPythonApplication rec {
]); ]);
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper wrapGAppsHook asciidoc wrapQtAppsHook wrapGAppsHook asciidoc
docbook_xml_dtd_45 docbook_xsl libxml2 libxslt docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
]; ];
@ -57,6 +57,9 @@ in python3Packages.buildPythonApplication rec {
./fix-restart.patch ./fix-restart.patch
]; ];
dontWrapGApps = true;
dontWrapQtApps = true;
postPatch = '' postPatch = ''
substituteInPlace qutebrowser/app.py --subst-var-by qutebrowser "$out/bin/qutebrowser" substituteInPlace qutebrowser/app.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
@ -95,6 +98,12 @@ in python3Packages.buildPythonApplication rec {
done done
''; '';
postFixup = ''
wrapProgram $out/bin/qutebrowser \
"''${gappsWrapperArgs[@]}" \
"''${qtWrapperArgs[@]}"
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/The-Compiler/qutebrowser; homepage = https://github.com/The-Compiler/qutebrowser;
description = "Keyboard-focused browser with a minimal GUI"; description = "Keyboard-focused browser with a minimal GUI";