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