9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
43 lines
976 B
Nix
43 lines
976 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
, pythonAtLeast
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "restrictedpython";
|
|
version = "6.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
pname = "RestrictedPython";
|
|
inherit version;
|
|
hash = "sha256-fljqFcySoLkW4MjKKV6LLG1A/uTRLhorUGPYbvwnmpw=";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-mock
|
|
];
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.11") [
|
|
"test_compile__compile_restricted_exec__5"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|