diff --git a/pkgs/development/python-modules/ld2410-ble/default.nix b/pkgs/development/python-modules/ld2410-ble/default.nix new file mode 100644 index 000000000000..0e1ba94a84ad --- /dev/null +++ b/pkgs/development/python-modules/ld2410-ble/default.nix @@ -0,0 +1,56 @@ +{ lib +, async-timeout +, bleak +, bleak-retry-connector +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "ld2410-ble"; + version = "0.1.1"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "930913"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-D8Z3OXlXWsaN0Ck9gx//J9TCaQmirYDbaXK7aTpI7ns="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + async-timeout + bleak + bleak-retry-connector + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=ld2410_ble --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "ld2410_ble" + ]; + + meta = with lib; { + description = "Library for the LD2410B modules from HiLinks"; + homepage = "https://github.com/930913/ld2410-ble"; + changelog = "https://github.com/930913/ld2410-ble/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cdb5b38c7b6c..2ad7b56f314f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5147,6 +5147,8 @@ self: super: with self; { lcov_cobertura = callPackage ../development/python-modules/lcov_cobertura { }; + ld2410-ble = callPackage ../development/python-modules/ld2410-ble { }; + ldap3 = callPackage ../development/python-modules/ldap3 { }; ldapdomaindump = callPackage ../development/python-modules/ldapdomaindump { };