1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytest-mock 5, pytestCheckHook 6}: 7 8buildPythonPackage rec { 9 pname = "restrictedpython"; 10 version = "5.2"; 11 format = "setuptools"; 12 13 src = fetchPypi { 14 pname = "RestrictedPython"; 15 inherit version; 16 sha256 = "sha256-Y02h9sXBIqJi9DOwg+49F6mgOfjxs3eFl++0dGHNNhs="; 17 }; 18 19 checkInputs = [ 20 pytestCheckHook 21 pytest-mock 22 ]; 23 24 pythonImportsCheck = [ 25 "RestrictedPython" 26 ]; 27 28 meta = with lib; { 29 description = "Restricted execution environment for Python to run untrusted code"; 30 homepage = "https://github.com/zopefoundation/RestrictedPython"; 31 license = licenses.zpl21; 32 maintainers = with maintainers; [ juaningan ]; 33 }; 34}