Merge pull request #70258 from juaningan/restrictedpython
home-assistant: add support for python_script component
This commit is contained in:
commit
0cffec3a7c
34
pkgs/development/python-modules/restrictedpython/default.nix
Normal file
34
pkgs/development/python-modules/restrictedpython/default.nix
Normal file
@ -0,0 +1,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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -583,7 +583,7 @@
|
|||||||
"pushsafer" = ps: with ps; [ ];
|
"pushsafer" = ps: with ps; [ ];
|
||||||
"pvoutput" = ps: with ps; [ ];
|
"pvoutput" = ps: with ps; [ ];
|
||||||
"pyload" = ps: with ps; [ ];
|
"pyload" = ps: with ps; [ ];
|
||||||
"python_script" = ps: with ps; [ ];
|
"python_script" = ps: with ps; [ restrictedpython ];
|
||||||
"qbittorrent" = ps: with ps; [ ];
|
"qbittorrent" = ps: with ps; [ ];
|
||||||
"qld_bushfire" = ps: with ps; [ ];
|
"qld_bushfire" = ps: with ps; [ ];
|
||||||
"qnap" = ps: with ps; [ ];
|
"qnap" = ps: with ps; [ ];
|
||||||
|
@ -5131,6 +5131,8 @@ in {
|
|||||||
|
|
||||||
repocheck = callPackage ../development/python-modules/repocheck { };
|
repocheck = callPackage ../development/python-modules/repocheck { };
|
||||||
|
|
||||||
|
restrictedpython = callPackage ../development/python-modules/restrictedpython { };
|
||||||
|
|
||||||
restview = callPackage ../development/python-modules/restview { };
|
restview = callPackage ../development/python-modules/restview { };
|
||||||
|
|
||||||
readme = callPackage ../development/python-modules/readme { };
|
readme = callPackage ../development/python-modules/readme { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user