1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flask,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "flask-paranoid";
11 version = "0.3.0";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "miguelgrinberg";
16 repo = "flask-paranoid";
17 rev = "v${version}";
18 hash = "sha256-tikD8efc3Q3xIQnaC3SSBaCRQxMI1HzXxeupvYeNnE4=";
19 };
20
21 postPatch = ''
22 # tests have a typo in one of the assertions
23 substituteInPlace tests/test_paranoid.py --replace "01-Jan-1970" "01 Jan 1970"
24 '';
25
26 propagatedBuildInputs = [ flask ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [ "flask_paranoid" ];
31
32 meta = with lib; {
33 homepage = "https://github.com/miguelgrinberg/flask-paranoid/";
34 description = "Simple user session protection";
35 license = licenses.mit;
36 maintainers = with maintainers; [ gador ];
37 };
38}