From 3279cb4433fe68291efbb8e9c40532a99f19b6d2 Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 10 Mar 2023 22:38:39 +0300 Subject: [PATCH 1/2] python3Packages.flask-expects-json: init at 1.7.0 --- .../flask-expects-json/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/flask-expects-json/default.nix diff --git a/pkgs/development/python-modules/flask-expects-json/default.nix b/pkgs/development/python-modules/flask-expects-json/default.nix new file mode 100644 index 000000000000..cd08050f7e96 --- /dev/null +++ b/pkgs/development/python-modules/flask-expects-json/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flask +, jsonschema +}: + +buildPythonPackage rec { + pname = "flask-expects-json"; + version = "1.7.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "Fischerfredl"; + repo = pname; + rev = version; + hash = "sha256-CUxuwqjjAb9Fy6xWtX1WtSANYaYr5//vY8k89KghYoQ="; + }; + + propagatedBuildInputs = [ flask jsonschema ]; + + # tests aren't included in sdist and don't pass on current flask + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/fischerfredl/flask-expects-json"; + description = "Decorator for REST endpoints in flask. Validate JSON request data."; + license = licenses.mit; + maintainers = []; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4f8335380137..01c34c2e56f4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3495,6 +3495,8 @@ self: super: with self; { flask_elastic = callPackage ../development/python-modules/flask-elastic { }; + flask-expects-json = callPackage ../development/python-modules/flask-expects-json { }; + flask-gravatar = callPackage ../development/python-modules/flask-gravatar { }; flask-httpauth = callPackage ../development/python-modules/flask-httpauth { }; From 3057c3ad5bddae47ff0da48233227ea5f19ecd0e Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 10 Mar 2023 22:38:47 +0300 Subject: [PATCH 2/2] changedetection-io: 0.39.22.1 -> 0.40.3 --- .../web-apps/changedetection-io/default.nix | 46 ++++++------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/pkgs/servers/web-apps/changedetection-io/default.nix b/pkgs/servers/web-apps/changedetection-io/default.nix index 1316219daf76..9b1810fab8c3 100644 --- a/pkgs/servers/web-apps/changedetection-io/default.nix +++ b/pkgs/servers/web-apps/changedetection-io/default.nix @@ -3,60 +3,40 @@ , fetchurl , python3 }: -let - py = python3.override { - packageOverrides = final: prev: { - flask = prev.flask.overridePythonAttrs (old: rec { - version = "2.1.3"; - src = old.src.override { - inherit version; - hash = "sha256-FZcuUBffBXXD1sCQuhaLbbkCWeYgrI1+qBOjlrrVtss="; - }; - }); - flask-restful = prev.flask-restful.overridePythonAttrs (old: rec { - disabledTests = old.disabledTests or [ ] ++ [ - # fails because of flask or werkzeug downgrade - "test_redirect" - ]; - }); - werkzeug = prev.werkzeug.overridePythonAttrs (old: rec { - version = "2.0.3"; - src = old.src.override { - inherit version; - hash = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw="; - }; - }); - }; - }; -in -py.pkgs.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "changedetection-io"; - version = "0.39.22.1"; + version = "0.40.3"; format = "setuptools"; src = fetchFromGitHub { owner = "dgtlmoon"; repo = "changedetection.io"; rev = version; - sha256 = "sha256-qK44m64/skmeoBgHToTyOpeWUF2kgks10OHoAoLim+k="; + sha256 = "sha256-RYxhkCSL17rU3C4rOArYptmYpdK/CDPw9xfXkKja2xs="; }; postPatch = '' substituteInPlace requirements.txt \ - --replace "bs4" "beautifulsoup4" \ --replace "cryptography~=3.4" "cryptography" \ - --replace "selenium~=4.1.0" "selenium" + --replace "dnspython<2.3.0" "dnspython" \ + --replace "pytest ~=6.2" "" \ + --replace "pytest-flask ~=1.2" "" \ + --replace "selenium~=4.1.0" "selenium" \ + --replace "werkzeug~=2.0.0" "werkzeug" ''; - propagatedBuildInputs = with py.pkgs; [ + propagatedBuildInputs = with python3.pkgs; [ apprise beautifulsoup4 brotli chardet cryptography + dnspython eventlet feedgen flask + flask-compress + flask-expects-json flask-login flask-restful flask-wtf @@ -83,7 +63,7 @@ py.pkgs.buildPythonApplication rec { # tests can currently not be run in one pytest invocation and without docker doCheck = false; - nativeCheckInputs = with py.pkgs; [ + nativeCheckInputs = with python3.pkgs; [ pytest-flask pytestCheckHook ];