archivy: fix runtime

Closes #130460

+54 -22
+54 -22
pkgs/applications/misc/archivy/default.nix
··· 1 - { lib 2 - , buildPythonApplication 3 - , fetchPypi 4 - , appdirs 5 - , attrs 6 - , beautifulsoup4 7 - , click-plugins 8 - , elasticsearch 9 - , flask-compress 10 - , flask_login 11 - , flask_wtf 12 - , html2text 13 - , python-dotenv 14 - , python-frontmatter 15 - , requests 16 - , tinydb 17 - , validators 18 - , werkzeug 19 - , wtforms 20 - }: 21 22 buildPythonApplication rec { 23 pname = "archivy"; ··· 40 --replace 'validators ==' 'validators >=' \ 41 --replace 'tinydb ==' 'tinydb >=' \ 42 --replace 'Flask_WTF == 0.14.3' 'Flask_WTF' \ 43 - --replace 'Werkzeug ==' 'Werkzeug >=' \ 44 - --replace 'Flask ==' 'Flask >=' 45 ''; 46 47 propagatedBuildInputs = [ ··· 57 python-dotenv 58 python-frontmatter 59 requests 60 tinydb 61 validators 62 werkzeug
··· 1 + { lib, stdenv, python3, fetchPypi }: 2 + 3 + let 4 + defaultOverrides = [ 5 + (self: super: { 6 + flask = super.flask.overridePythonAttrs (oldAttrs: rec { 7 + version = "1.1.2"; 8 + pname = "Flask"; 9 + 10 + src = super.fetchPypi { 11 + inherit pname version; 12 + sha256 = "sha256-Tvoa4tfJhlr0iYbeiuuFBL8yx/PW/ck1PTSyH0sScGA="; 13 + }; 14 + 15 + checkInputs = [ self.pytest ]; 16 + propagatedBuildInputs = with self; [ itsdangerous click werkzeug jinja2 ]; 17 + 18 + doCheck = false; 19 + }); 20 + }) 21 + 22 + (self: super: { 23 + flask_login = super.flask_login.overridePythonAttrs (oldAttrs: rec { 24 + pname = "Flask"; 25 + version = "0.5.0"; 26 + 27 + src = fetchPypi { 28 + inherit pname version; 29 + sha256 = "6d33aef15b5bcead780acc339464aae8a6e28f13c90d8b1cf9de8b549d1c0b4b"; 30 + }; 31 + doCheck = false; 32 + }); 33 + }) 34 + ]; 35 + 36 + mkOverride = attrname: version: sha256: 37 + self: super: { 38 + ${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: { 39 + inherit version; 40 + src = oldAttrs.src.override { 41 + inherit version sha256; 42 + }; 43 + }); 44 + }; 45 + 46 + py = python3.override { 47 + # Put packageOverrides at the start so they are applied after defaultOverrides 48 + packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) (defaultOverrides); 49 + }; 50 + 51 + in 52 + with py.pkgs; 53 54 buildPythonApplication rec { 55 pname = "archivy"; ··· 72 --replace 'validators ==' 'validators >=' \ 73 --replace 'tinydb ==' 'tinydb >=' \ 74 --replace 'Flask_WTF == 0.14.3' 'Flask_WTF' \ 75 + --replace 'Werkzeug ==' 'Werkzeug >=' 76 ''; 77 78 propagatedBuildInputs = [ ··· 88 python-dotenv 89 python-frontmatter 90 requests 91 + setuptools 92 tinydb 93 validators 94 werkzeug