From 4396e4f65889ed0a85b24183240f06cd53f3801c Mon Sep 17 00:00:00 2001 From: "florian on nixos (Florian Brandes)" Date: Sun, 16 Jan 2022 11:44:49 +0100 Subject: [PATCH] python3Packages.flask-paranoid: init at 0.2 needed for pgadmin4 init https://github.com/NixOS/nixpkgs/pull/154764 --- .../python-modules/flask-paranoid/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/flask-paranoid/default.nix diff --git a/pkgs/development/python-modules/flask-paranoid/default.nix b/pkgs/development/python-modules/flask-paranoid/default.nix new file mode 100644 index 000000000000..787b34a93b37 --- /dev/null +++ b/pkgs/development/python-modules/flask-paranoid/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flask +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "flask-paranoid"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "miguelgrinberg"; + repo = pname; + rev = "v${version}"; + sha256 = "0WWc/ktAOuTk4A75xI1jCj/aef2+1TjLKBA9+PRfJO0="; + }; + + postPatch = '' + # tests have a typo in one of the assertions + substituteInPlace tests/test_paranoid.py --replace "01-Jan-1970" "01 Jan 1970" + ''; + + propagatedBuildInputs = [ + flask + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "flask_paranoid" ]; + + meta = with lib; { + homepage = "https://github.com/miguelgrinberg/flask-paranoid/"; + description = "Simple user session protection"; + license = licenses.mit; + maintainers = with maintainers; [ gador ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e02cdeee1b4f..2c89637c7146 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2908,6 +2908,8 @@ in { flask-paginate = callPackage ../development/python-modules/flask-paginate { }; + flask-paranoid = callPackage ../development/python-modules/flask-paranoid { }; + flask_principal = callPackage ../development/python-modules/flask-principal { }; flask-pymongo = callPackage ../development/python-modules/Flask-PyMongo { };