From c9318f4d2d28d9716699c92280eccb4f12638aef Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Sun, 25 Aug 2013 09:49:20 +0200 Subject: [PATCH] calibre: upgrade to 1.0 Upstream insists on using private qt headers. We do not want nixpkgs' qt to export those. So I provided a small hack to take them directly from qt's source tarball. I made sure everything uses the normal system qt and headers, except for the 1 .so file (qt_hack) that needs these private headers. Because of this, there is barely any increate in size or buildtime. --- pkgs/applications/misc/calibre/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 01060909f3d..559a4d3ea0b 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -4,24 +4,31 @@ }: stdenv.mkDerivation rec { - name = "calibre-0.9.11"; + name = "calibre-1.0.0"; # 0.9.12+ versions won't build due to missing qt4 private headers: https://bugs.launchpad.net/calibre/+bug/1094719 src = fetchurl { url = "mirror://sourceforge/calibre/${name}.tar.xz"; - sha256 = "0jjs2cx222pbv4nrivlxag5fxa0v9m63x7arcll6xi173zdn4gg8"; + sha256 = "0qz369n46ijk8jbbgwnvj3v0byp5npn2zdb4lvc6mwa143mr6d62"; }; inherit python; nativeBuildInputs = [ makeWrapper pkgconfig ]; + patchPhase = '' + tar xf ${qt48.src} + sed -i setup/build_environment.py \ + -e "s|^qt_private_inc = .*|qt_private_inc = ['%s/%s'%('`pwd`/qt-everywhere-opensource-src-4.8.5/include', m) for m in ('QtGui', 'QtCore')]|" + ''; + buildInputs = [ python pyqt4 sip popplerQt4 libpng imagemagick libjpeg - fontconfig podofo qt48 pil chmlib icu + fontconfig podofo qt48 pil chmlib icu sqlite libusb1 libmtp pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow - pythonPackages.sqlite3 pythonPackages.netifaces sqlite libusb1 libmtp + pythonPackages.sqlite3 pythonPackages.netifaces pythonPackages.apsw + pythonPackages.cssselect ]; installPhase = ''