summary refs log tree commit diff
path: root/pkgs/development/python-modules/flask-paranoid/default.nix
blob: 787b34a93b37f3fd357705e34a7e26542193901b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 ];
  };
}