diff --git a/pkgs/development/python-modules/esprima/default.nix b/pkgs/development/python-modules/esprima/default.nix new file mode 100644 index 000000000000..b32a098c12bc --- /dev/null +++ b/pkgs/development/python-modules/esprima/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "esprima"; + version = "4.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Kronuz"; + repo = "esprima-python"; + rev = "v${version}"; + sha256 = "WtkPCReXhxyr6pOzE9gsdIeBlLk+nSnbxkS3OowEaHo="; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ + "test/__main__.py::TestEsprima" + ]; + + pythonImportsCheck = [ + "esprima" + ]; + + meta = with lib; { + description = "Python parser for standard-compliant ECMAScript"; + homepage = "https://github.com/Kronuz/esprima-python"; + license = licenses.bsd2; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/quantum-gateway/default.nix b/pkgs/development/python-modules/quantum-gateway/default.nix new file mode 100644 index 000000000000..19b9ae22264a --- /dev/null +++ b/pkgs/development/python-modules/quantum-gateway/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, esprima +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +, setuptools-scm +, urllib3 +}: + +buildPythonPackage rec { + pname = "quantum-gateway"; + version = "0.0.6"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "cisasteelersfan"; + repo = "quantum_gateway"; + rev = version; + sha256 = "f2LYOr9xJSfbA/1aHfll5lg7r05o855Zkkk9HuRamP8="; + }; + + propagatedBuildInputs = [ + urllib3 + esprima + requests + ]; + + checkInputs = [ + requests-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "quantum_gateway" + ]; + + meta = with lib; { + description = "Python library for interacting with Verizon Fios Quantum gateway devices"; + homepage = "https://github.com/cisasteelersfan/quantum_gateway"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index ca59eed348bd..4ac35577682a 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -683,7 +683,7 @@ "qld_bushfire" = ps: with ps; [ georss-qld-bushfire-alert-client ]; "qnap" = ps: with ps; [ ]; # missing inputs: qnapstats "qrcode" = ps: with ps; [ pillow ]; # missing inputs: pyzbar - "quantum_gateway" = ps: with ps; [ ]; # missing inputs: quantum-gateway + "quantum_gateway" = ps: with ps; [ quantum-gateway ]; "qvr_pro" = ps: with ps; [ ]; # missing inputs: pyqvrpro "qwikswitch" = ps: with ps; [ ]; # missing inputs: pyqwikswitch "rachio" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa rachiopy ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cee093b18472..7d4fa594870f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2560,6 +2560,8 @@ in { eradicate = callPackage ../development/python-modules/eradicate { }; + esprima = callPackage ../development/python-modules/esprima { }; + escapism = callPackage ../development/python-modules/escapism { }; etcd = callPackage ../development/python-modules/etcd { }; @@ -8202,6 +8204,8 @@ in { quantities = callPackage ../development/python-modules/quantities { }; + quantum-gateway = callPackage ../development/python-modules/quantum-gateway { }; + querystring_parser = callPackage ../development/python-modules/querystring-parser { }; questionary = callPackage ../development/python-modules/questionary { };