2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flask,
|
|
|
|
pytestCheckHook,
|
2022-01-19 23:45:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flask-paranoid";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.3.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-tikD8efc3Q3xIQnaC3SSBaCRQxMI1HzXxeupvYeNnE4=";
|
2022-01-19 23:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# tests have a typo in one of the assertions
|
|
|
|
substituteInPlace tests/test_paranoid.py --replace "01-Jan-1970" "01 Jan 1970"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ flask ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|