depot/third_party/nixpkgs/pkgs/development/python-modules/flask-paranoid/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

38 lines
860 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
flask,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "flask-paranoid";
version = "0.3.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "miguelgrinberg";
repo = pname;
rev = "v${version}";
hash = "sha256-tikD8efc3Q3xIQnaC3SSBaCRQxMI1HzXxeupvYeNnE4=";
};
postPatch = ''
# tests have a typo in one of the assertions
substituteInPlace tests/test_paranoid.py --replace "01-Jan-1970" "01 Jan 1970"
'';
propagatedBuildInputs = [ flask ];
nativeCheckInputs = [ 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 ];
};
}