Merge pull request #144235 from pborzenkov/calibre-web

This commit is contained in:
Sandro 2021-12-16 14:08:25 +01:00 committed by GitHub
commit f04e237833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,23 +7,15 @@
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "calibre-web"; pname = "calibre-web";
version = "0.6.13"; version = "0.6.14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "janeczku"; owner = "janeczku";
repo = "calibre-web"; repo = "calibre-web";
rev = version; rev = version;
sha256 = "sha256-zU7ujvFPi4UaaEglIK3YX3TJxBME35NEKKblnJRt0tM="; sha256 = "sha256-rR5pUB3A0WNQxq7ZJ6ykua7hMlzs49aMmVbBUOkOVfA=";
}; };
prePatch = ''
substituteInPlace setup.cfg \
--replace "requests>=2.11.1,<2.25.0" "requests" \
--replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \
--replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" \
--replace "unidecode>=0.04.19,<1.3.0" "unidecode>=0.04.19"
'';
patches = [ patches = [
# default-logger.patch switches default logger to /dev/stdout. Otherwise calibre-web tries to open a file relative # default-logger.patch switches default logger to /dev/stdout. Otherwise calibre-web tries to open a file relative
# to its location, which can't be done as the store is read-only. Log file location can later be configured using UI # to its location, which can't be done as the store is read-only. Log file location can later be configured using UI
@ -42,6 +34,13 @@ python3.pkgs.buildPythonApplication rec {
mkdir -p src/calibreweb mkdir -p src/calibreweb
mv cps.py src/calibreweb/__init__.py mv cps.py src/calibreweb/__init__.py
mv cps src/calibreweb mv cps src/calibreweb
substituteInPlace setup.cfg \
--replace "requests>=2.11.1,<2.25.0" "requests" \
--replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \
--replace "PyPDF3>=1.0.0,<1.0.4" "PyPDF3>=1.0.0" \
--replace "unidecode>=0.04.19,<1.3.0" "unidecode>=0.04.19" \
--replace "flask-wtf>=0.14.2,<0.16.0" "flask-wtf>=0.14.2"
''; '';
# Upstream repo doesn't provide any tests. # Upstream repo doesn't provide any tests.
@ -52,6 +51,7 @@ python3.pkgs.buildPythonApplication rec {
flask-babel flask-babel
flask_login flask_login
flask_principal flask_principal
flask_wtf
iso-639 iso-639
lxml lxml
pypdf3 pypdf3