calibre: use qt5.wrapQtAppsHook, partially fixes #65313
Still fails due to Qt issue.
This commit is contained in:
parent
92cb811455
commit
1190f69d34
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, poppler_utils, pkgconfig, libpng
|
||||
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmake, icu, sqlite
|
||||
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, libusb1, libmtp
|
||||
, xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo
|
||||
, xdg_utils, makeDesktopItem, wrapGAppsHook, removeReferencesTo, qt5
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo ];
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig qmake removeReferencesTo qt5.wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
poppler_utils libpng imagemagick libjpeg
|
||||
@ -48,6 +48,11 @@ stdenv.mkDerivation rec {
|
||||
odfpy
|
||||
]);
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix PYTHONPATH: $PYTHONPATH"
|
||||
"--prefix PATH: ${poppler_utils.out}/bin}"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -70,9 +75,8 @@ stdenv.mkDerivation rec {
|
||||
sed -i "s/env python[0-9.]*/python/" $PYFILES
|
||||
sed -i "2i import sys; sys.argv[0] = 'calibre'" $out/bin/calibre
|
||||
|
||||
for a in $out/bin/*; do
|
||||
wrapProgram $a --prefix PYTHONPATH : $PYTHONPATH \
|
||||
--prefix PATH : ${poppler_utils.out}/bin
|
||||
for program in $out/bin/*; do
|
||||
wrapQtApp $program
|
||||
done
|
||||
|
||||
# Replace @out@ by the output path.
|
||||
@ -95,6 +99,10 @@ stdenv.mkDerivation rec {
|
||||
remove-references-to -t ${podofo.dev} $out/lib/calibre/calibre/plugins/podofo.so
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
||||
'';
|
||||
|
||||
disallowedReferences = [ podofo.dev ];
|
||||
|
||||
calibreDesktopItem = makeDesktopItem {
|
||||
|
Loading…
Reference in New Issue
Block a user