From 16835711af55c4175948f5654c02cb098e534f17 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 14 Aug 2022 11:10:46 +0200 Subject: [PATCH] python310Packages.bluetooth-data-tools: init at 0.1.2 --- .../bluetooth-data-tools/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/bluetooth-data-tools/default.nix diff --git a/pkgs/development/python-modules/bluetooth-data-tools/default.nix b/pkgs/development/python-modules/bluetooth-data-tools/default.nix new file mode 100644 index 000000000000..8744adc57555 --- /dev/null +++ b/pkgs/development/python-modules/bluetooth-data-tools/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "bluetooth-data-tools"; + version = "0.1.2"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "Bluetooth-Devices"; + repo = pname; + rev = "v${version}"; + hash = "sha256-AobkHODtWun2TPxb6yR/ieYyeIndTG0KmxTY81fQHCA="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=bluetooth_data_tools --cov-report=term-missing:skip-covered" "" + ''; + + pythonImportsCheck = [ + "bluetooth_data_tools" + ]; + + meta = with lib; { + description = "Library for converting bluetooth data and packets"; + homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools"; + 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 9e7c6ef23b2f..ae07fde44a98 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1383,6 +1383,8 @@ in { bluetooth-adapters = callPackage ../development/python-modules/bluetooth-adapters { }; + bluetooth-data-tools= callPackage ../development/python-modules/bluetooth-data-tools { }; + bluetooth-sensor-state-data = callPackage ../development/python-modules/bluetooth-sensor-state-data { }; blurhash = callPackage ../development/python-modules/blurhash { };