2020-05-15 21:57:56 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, maya
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.3.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "secure";
|
2020-05-15 21:57:56 +00:00
|
|
|
disabled = isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "typeerror";
|
|
|
|
repo = "secure.py";
|
2021-06-28 23:13:55 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1ajz1nx0nnhsc80xbgbc42ib2h08qnccvsp5i583rd9b0f9pklwk";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ maya requests ];
|
|
|
|
|
|
|
|
# no tests in release
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "secure" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Adds optional security headers and cookie attributes for Python web frameworks";
|
|
|
|
homepage = "https://github.com/TypeError/secure.py";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|