summary refs log tree commit diff
path: root/pkgs/development/python-modules/restrictedpython/default.nix
blob: 09b713dc87cbaab85e0b986376b1363a4e0503d8 (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

# Test dependencies
, pytest, pytest-mock
}:

buildPythonPackage rec {
  pname = "RestrictedPython";
  version = "5.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1g0sffn6ifkl1w8gq15rpaqm8c7l68bsnm77wcd3flyzzydmd050";
  };

  #propagatedBuildInputs = [ xmltodict requests ifaddr ];

  checkInputs = [
    pytest pytest-mock
  ];

  checkPhase = ''
    pytest
  '';

  meta = {
    homepage = "https://github.com/zopefoundation/RestrictedPython";
    description = "A restricted execution environment for Python to run untrusted code";
    license = lib.licenses.zpl21;
    maintainers = with lib.maintainers; [ juaningan ];
  };
}