Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytest-mock 5, pytestCheckHook 6, pythonOlder 7}: 8 9buildPythonPackage rec { 10 pname = "restrictedpython"; 11 version = "6.0"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchPypi { 17 pname = "RestrictedPython"; 18 inherit version; 19 hash = "sha256-QFzwvZ7sLxmxMmtfSCKO/lbWWQtOkYJrjMOyzUAKlq0="; 20 }; 21 22 nativeCheckInputs = [ 23 pytestCheckHook 24 pytest-mock 25 ]; 26 27 pythonImportsCheck = [ 28 "RestrictedPython" 29 ]; 30 31 meta = with lib; { 32 description = "Restricted execution environment for Python to run untrusted code"; 33 homepage = "https://github.com/zopefoundation/RestrictedPython"; 34 changelog = "https://github.com/zopefoundation/RestrictedPython/blob/${version}/CHANGES.rst"; 35 license = licenses.zpl21; 36 maintainers = with maintainers; [ juaningan ]; 37 }; 38}