diff --git a/pkgs/development/python-modules/sensor-state-data/default.nix b/pkgs/development/python-modules/sensor-state-data/default.nix new file mode 100644 index 000000000000..a29ad29a92c3 --- /dev/null +++ b/pkgs/development/python-modules/sensor-state-data/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, home-assistant-bluetooth +, poetry-core +, pytestCheckHook +, pythonOlder +, sensor-state-data +}: + +buildPythonPackage rec { + pname = "sensor-state-data"; + version = "2.0.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-EywNH6REtopJoowsKQNNyJNYYyBR7L2pcrvmZAr5PZg="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=sensor_state_data --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "sensor_state_data" + ]; + + meta = with lib; { + description = "Models for storing and converting Sensor Data state"; + homepage = "https://github.com/bluetooth-devices/sensor-state-data"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6f90e3ca8388..0a70b5f81c45 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9721,6 +9721,8 @@ in { sense-energy = callPackage ../development/python-modules/sense-energy { }; + sensor-state-data = callPackage ../development/python-modules/sensor-state-data { }; + sentencepiece = callPackage ../development/python-modules/sentencepiece { inherit (pkgs) sentencepiece; };