summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-10-02 16:13:18 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-10-02 16:13:18 +0200
commite63a3267ca635b085d61ba130400f10bc4cd8aa5 (patch)
tree8e8f4737598a96f23c102a3510cff967ce0b93d0 /pkgs/development/python-modules
parent4e62f9810aab1e90229390af3238a3cc5b1f67e4 (diff)
python310Packages.kegtron-ble: init at 0.4.0
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/kegtron-ble/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/kegtron-ble/default.nix b/pkgs/development/python-modules/kegtron-ble/default.nix
new file mode 100644
index 000000000000..4af4817d7f84
--- /dev/null
+++ b/pkgs/development/python-modules/kegtron-ble/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, bluetooth-data-tools
+, bluetooth-sensor-state-data
+, buildPythonPackage
+, fetchFromGitHub
+, poetry-core
+, pytestCheckHook
+, pythonOlder
+, sensor-state-data
+}:
+
+buildPythonPackage rec {
+ pname = "kegtron-ble";
+ version = "0.4.0";
+ format = "pyproject";
+
+ disabled = pythonOlder "3.9";
+
+ src = fetchFromGitHub {
+ owner = "Bluetooth-Devices";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-O5I5shW8nL2RAQptS2Bp/GI/4L6o0xXXmwYvRq0MM8o=";
+ };
+
+ nativeBuildInputs = [
+ poetry-core
+ ];
+
+ propagatedBuildInputs = [
+ bluetooth-data-tools
+ bluetooth-sensor-state-data
+ sensor-state-data
+ ];
+
+ checkInputs = [
+ pytestCheckHook
+ ];
+
+ postPatch = ''
+ substituteInPlace pyproject.toml \
+ --replace " --cov=kegtron_ble --cov-report=term-missing:skip-covered" ""
+ '';
+
+ pythonImportsCheck = [
+ "kegtron_ble"
+ ];
+
+ meta = with lib; {
+ description = "Library for Kegtron BLE devices";
+ homepage = "https://github.com/Bluetooth-Devices/kegtron-ble";
+ license = with licenses; [ mit ];
+ maintainers = with maintainers; [ fab ];
+ };
+}