1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

calibre: update from 1.48.0 to 2.0.0

This commit is contained in:
Pascal Wittmann 2014-08-23 12:03:03 +02:00
parent e93eb33058
commit 116930f5ba
2 changed files with 23 additions and 17 deletions

View file

@ -1,30 +1,29 @@
{ stdenv, fetchurl, python, pyqt4, sip, popplerQt4, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qt48, icu, sqlite
{ stdenv, fetchurl, python, pyqt5, sip_4_16, poppler, pkgconfig, libpng
, imagemagick, libjpeg, fontconfig, podofo, qt5, icu, sqlite
, pil, makeWrapper, unrar, chmlib, pythonPackages, xz, libusb1, libmtp
, xdg_utils
}:
stdenv.mkDerivation rec {
name = "calibre-1.48.0";
name = "calibre-2.0.0";
src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz";
sha256 = "0wplmf3p4s5zwn9ri8ry18bx7k3pw1c1ngrc4msf7i8icq7hj177";
sha256 = "1fpn8icfyag2ybj2ywd81sva56ycsin56gyap5m9j5crx63p4c91";
};
inherit python;
nativeBuildInputs = [ makeWrapper pkgconfig ];
patchPhase = ''
tar xf ${qt48.src}
qtdir=$(realpath $(ls | grep qt | grep 4.8 | grep src))
sed -i setup/build_environment.py \
-e "s|^qt_private_inc = .*|qt_private_inc = ['$qtdir/include/%s'%(m) for m in ('QtGui', 'QtCore')]|"
sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip':" \
setup/build_environment.py
'';
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs =
[ python pyqt4 sip popplerQt4 libpng imagemagick libjpeg
fontconfig podofo qt48 pil chmlib icu sqlite libusb1 libmtp
[ python pyqt5 sip_4_16 poppler libpng imagemagick libjpeg
fontconfig podofo qt5 pil chmlib icu sqlite libusb1 libmtp xdg_utils
pythonPackages.mechanize pythonPackages.lxml pythonPackages.dateutil
pythonPackages.cssutils pythonPackages.beautifulsoup pythonPackages.pillow
pythonPackages.sqlite3 pythonPackages.netifaces pythonPackages.apsw
@ -33,14 +32,15 @@ stdenv.mkDerivation rec {
installPhase = ''
export HOME=$TMPDIR/fakehome
export POPPLER_INC_DIR=${popplerQt4}/include/poppler
export POPPLER_LIB_DIR=${popplerQt4}/lib
export POPPLER_INC_DIR=${poppler}/include/poppler
export POPPLER_LIB_DIR=${poppler}/lib
export MAGICK_INC=${imagemagick}/include/ImageMagick
export MAGICK_LIB=${imagemagick}/lib
export FC_INC_DIR=${fontconfig}/include/fontconfig
export FC_LIB_DIR=${fontconfig}/lib
export PODOFO_INC_DIR=${podofo}/include/podofo
export PODOFO_LIB_DIR=${podofo}/lib
export SIP_BIN=${sip_4_16}/bin/sip
python setup.py install --prefix=$out
PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py
@ -48,8 +48,12 @@ stdenv.mkDerivation rec {
$out/lib/calibre/calibre/ebooks/rtf2xml/*.py"
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 LD_LIBRARY_PATH : ${unrar}/lib --prefix PATH : ${popplerQt4}/bin
wrapProgram $a --prefix PYTHONPATH : $PYTHONPATH \
--prefix LD_LIBRARY_PATH : ${unrar}/lib \
--prefix PATH : ${poppler}/bin
done
'';
@ -57,7 +61,7 @@ stdenv.mkDerivation rec {
description = "Comprehensive e-book software";
homepage = http://calibre-ebook.com;
license = licenses.gpl3;
maintainers = with maintainers; [ viric iElectric ];
maintainers = with maintainers; [ viric iElectric pSub ];
platforms = platforms.linux;
};
}

View file

@ -8277,7 +8277,9 @@ let
inherit (gnome) libglade;
};
calibre = callPackage ../applications/misc/calibre { };
calibre = callPackage ../applications/misc/calibre {
inherit (pythonPackages) pyqt5 sip_4_16;
};
camlistore = callPackage ../applications/misc/camlistore { };