2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "restrictedpython";
|
|
|
|
version = "5.2";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "RestrictedPython";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "sha256-Y02h9sXBIqJi9DOwg+49F6mgOfjxs3eFl++0dGHNNhs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"RestrictedPython"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Restricted execution environment for Python to run untrusted code";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/zopefoundation/RestrictedPython";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.zpl21;
|
|
|
|
maintainers = with maintainers; [ juaningan ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|