From 3c24ba1ef05a581c5c3f40c6b2e397172a48c9a3 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 3 Feb 2023 17:04:24 +0800 Subject: [PATCH] calibre-web: support flask-babel 3 --- pkgs/servers/calibre-web/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/servers/calibre-web/default.nix b/pkgs/servers/calibre-web/default.nix index 14c4822f3fb4..0fd0ecd63797 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" \