6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
38 lines
844 B
Nix
38 lines
844 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "restrictedpython";
|
|
version = "6.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "RestrictedPython";
|
|
inherit version;
|
|
hash = "sha256-QFzwvZ7sLxmxMmtfSCKO/lbWWQtOkYJrjMOyzUAKlq0=";
|
|
};
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
pytest-mock
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"RestrictedPython"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Restricted execution environment for Python to run untrusted code";
|
|
homepage = "https://github.com/zopefoundation/RestrictedPython";
|
|
changelog = "https://github.com/zopefoundation/RestrictedPython/blob/${version}/CHANGES.rst";
|
|
license = licenses.zpl21;
|
|
maintainers = with maintainers; [ juaningan ];
|
|
};
|
|
}
|