about summary refs log tree commit diff
path: root/pkgs/servers/calibre-web
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-02-03 17:04:24 +0800
committerNick Cao <nickcao@nichi.co>2023-02-03 17:04:24 +0800
commit3c24ba1ef05a581c5c3f40c6b2e397172a48c9a3 (patch)
tree884523a8664088965871b76c5391790fd646aa0b /pkgs/servers/calibre-web
parent89fae351e4a69b429182e6ffdd348202dd28522e (diff)
calibre-web: support flask-babel 3
Diffstat (limited to 'pkgs/servers/calibre-web')
-rw-r--r--pkgs/servers/calibre-web/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix
index 14c4822f3fb45..0fd0ecd63797d 100644
--- a/pkgs/servers/calibre-web/default.nix
+++ b/pkgs/servers/calibre-web/default.nix
@@ -2,6 +2,7 @@
 , fetchFromGitHub
 , nixosTests
 , python3
+, fetchpatch
 }:
 
 python3.pkgs.buildPythonApplication rec {
@@ -43,6 +44,12 @@ python3.pkgs.buildPythonApplication rec {
     # and exit. This is gonna be used to configure calibre-web declaratively, as most of its configuration parameters
     # are stored in the DB.
     ./db-migrations.patch
+    # Handle version 3.0 of flask-babel
+    (fetchpatch {
+      url = "https://github.com/janeczku/calibre-web/commit/94a6931d48d347ae6c07e2b5f0301e8cf97cf53d.patch";
+      excludes = [ "requirements.txt" ];
+      hash = "sha256-0DQ+LbIOOwjBXQh+b1w8dYQ3s+xZ6nFoH5GvgJdBAFI=";
+    })
   ];
 
   # calibre-web doesn't follow setuptools directory structure. The following is taken from the script
@@ -59,6 +66,7 @@ python3.pkgs.buildPythonApplication rec {
       --replace "cps = calibreweb:main" "calibre-web = calibreweb:main" \
       --replace "chardet>=3.0.0,<4.1.0" "chardet>=3.0.0,<6" \
       --replace "Flask>=1.0.2,<2.1.0" "Flask>=1.0.2" \
+      --replace "Flask-Babel>=0.11.1,<2.1.0" "Flask-Babel>=0.11.1" \
       --replace "Flask-Login>=0.3.2,<0.6.2" "Flask-Login>=0.3.2" \
       --replace "flask-wtf>=0.14.2,<1.1.0" "flask-wtf>=0.14.2" \
       --replace "lxml>=3.8.0,<4.9.0" "lxml>=3.8.0" \