about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/restrictedpython/default.nix
blob: 6e782b1bd336a8d41a328f04de7e911e368ffee2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, buildPythonPackage
, fetchPypi
, pytest-mock
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "restrictedpython";
  version = "5.2";
  format = "setuptools";

  src = fetchPypi {
    pname = "RestrictedPython";
    inherit version;
    sha256 = "sha256-Y02h9sXBIqJi9DOwg+49F6mgOfjxs3eFl++0dGHNNhs=";
  };

  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";
    license = licenses.zpl21;
    maintainers = with maintainers; [ juaningan ];
  };
}