From e0beb61e601c1c4451dee3430ce520f0d2defc60 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 23 Dec 2022 02:01:05 +0100 Subject: [PATCH] python3Packages.hassil: init at 0.1.3 --- .../python-modules/hassil/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/hassil/default.nix diff --git a/pkgs/development/python-modules/hassil/default.nix b/pkgs/development/python-modules/hassil/default.nix new file mode 100644 index 000000000000..bbbe26faccb9 --- /dev/null +++ b/pkgs/development/python-modules/hassil/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi + +# propagates +, antlr4-python3-runtime +, dataclasses-json +, pyyaml + +# tests +, pytestCheckHook +}: + +let + pname = "hassil"; + version = "0.1.3"; +in +buildPythonPackage { + inherit pname version; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-KWkzHWMo50OIrZ2kwFhhqDSleFFkAD7/JugjvSyCkww="; + }; + + postPatch = '' + sed -i 's/antlr4-python3-runtime==.*/antlr4-python3-runtime/' requirements.txt + ''; + + propagatedBuildInputs = [ + antlr4-python3-runtime + dataclasses-json + pyyaml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + changelog = "https://github.com/home-assistant/hassil/releases/tag/v${version}"; + description = "Intent parsing for Home Assistant"; + homepage = "https://github.com/home-assistant/hassil"; + license = licenses.asl20; + maintainers = teams.home-assistant.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 69241e9fccf4..d47835b1568e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4169,6 +4169,8 @@ self: super: with self; { hass-nabucasa = callPackage ../development/python-modules/hass-nabucasa { }; + hassil = callPackage ../development/python-modules/hassil { }; + hatasmota = callPackage ../development/python-modules/hatasmota { }; hatchling = callPackage ../development/python-modules/hatchling { };