about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-07-25 14:56:26 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-07-30 13:16:18 +0200
commit1190f69d3490b9b6b420d4109fcfb8cd59b9e770 (patch)
tree05d071b33ea584fabc538cf7078a7c122b2335ef
parent92cb811455e9fecf9900eb9612592b4951d6a270 (diff)
downloadnixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar.gz
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar.bz2
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar.lz
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar.xz
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.tar.zst
nixlib-1190f69d3490b9b6b420d4109fcfb8cd59b9e770.zip
calibre: use qt5.wrapQtAppsHook, partially fixes #65313
Still fails due to Qt issue.
-rw-r--r--pkgs/applications/misc/calibre/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index b022f5230073..6b4ca4e03550 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -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 {