mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
calibre: use python2
This commit is contained in:
parent
3cd2ca2751
commit
fad1e442ad
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, fetchpatch, python, pyqt5, sip, poppler_utils, pkgconfig, libpng
|
||||
{ stdenv, fetchurl, fetchpatch, poppler_utils, pkgconfig, libpng
|
||||
, imagemagick, libjpeg, fontconfig, podofo, qtbase, qmakeHook, icu, sqlite
|
||||
, makeWrapper, unrarSupport ? false, chmlib, pythonPackages, xz, libusb1, libmtp
|
||||
, makeWrapper, unrarSupport ? false, chmlib, python2Packages, xz, libusb1, libmtp
|
||||
, xdg_utils, makeDesktopItem
|
||||
}:
|
||||
|
||||
@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "18iv1c2nx93gkfqa3k2m42dk4p59b9zp08fggb6imc1xqh2icfch";
|
||||
};
|
||||
|
||||
inherit python;
|
||||
|
||||
patches = [
|
||||
# Patches from Debian that:
|
||||
# - disable plugin installation (very insecure)
|
||||
@ -39,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
] ++ stdenv.lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;
|
||||
|
||||
prePatch = ''
|
||||
sed -i "/pyqt_sip_dir/ s:=.*:= '${pyqt5}/share/sip/PyQt5':" \
|
||||
sed -i "/pyqt_sip_dir/ s:=.*:= '${python2Packages.pyqt5}/share/sip/PyQt5':" \
|
||||
setup/build_environment.py
|
||||
|
||||
# Remove unneeded files and libs
|
||||
@ -56,10 +54,11 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig qmakeHook ];
|
||||
|
||||
buildInputs = [
|
||||
python pyqt5 sip poppler_utils libpng imagemagick libjpeg
|
||||
poppler_utils libpng imagemagick libjpeg
|
||||
fontconfig podofo qtbase chmlib icu sqlite libusb1 libmtp xdg_utils
|
||||
] ++ (with pythonPackages; [
|
||||
] ++ (with python2Packages; [
|
||||
apsw beautifulsoup cssselect cssutils dateutil lxml mechanize netifaces pillow
|
||||
python pyqt5 sip
|
||||
# the following are distributed with calibre, but we use upstream instead
|
||||
chardet cherrypy html5lib odfpy routes
|
||||
]);
|
||||
@ -74,8 +73,8 @@ stdenv.mkDerivation rec {
|
||||
export FC_LIB_DIR=${fontconfig.lib}/lib
|
||||
export PODOFO_INC_DIR=${podofo}/include/podofo
|
||||
export PODOFO_LIB_DIR=${podofo}/lib
|
||||
export SIP_BIN=${sip}/bin/sip
|
||||
python setup.py install --prefix=$out
|
||||
export SIP_BIN=${python2Packages.sip}/bin/sip
|
||||
${python2Packages.python.interpreter} setup.py install --prefix=$out
|
||||
|
||||
PYFILES="$out/bin/* $out/lib/calibre/calibre/web/feeds/*.py
|
||||
$out/lib/calibre/calibre/ebooks/metadata/*.py
|
||||
|
@ -12303,9 +12303,7 @@ in
|
||||
|
||||
calcurse = callPackage ../applications/misc/calcurse { };
|
||||
|
||||
calibre = qt5.callPackage ../applications/misc/calibre {
|
||||
inherit (pythonPackages) pyqt5 sip;
|
||||
};
|
||||
calibre = qt5.callPackage ../applications/misc/calibre { };
|
||||
|
||||
camlistore = callPackage ../applications/misc/camlistore { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user