2022-04-27 09:35:20 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, flask, mock, python }:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Flask-SeaSurf";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.1.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "maxcountryman";
|
|
|
|
repo = "flask-seasurf";
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-L/ZUEqqHmsyXG5eShcITII36ttwQlZN5GBngo+GcCdw=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ flask ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "flask_seasurf" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Flask extension for preventing cross-site request forgery";
|
|
|
|
homepage = "https://github.com/maxcountryman/flask-seasurf";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ zhaofengli ];
|
|
|
|
};
|
|
|
|
}
|