about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-10-02 16:07:57 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2022-10-02 16:07:57 +0200
commit4e62f9810aab1e90229390af3238a3cc5b1f67e4 (patch)
tree56db155173defc2633cbce02f1241b63c4775cd7
parenta2cf0add924c0b1543cd8653a3d5db8d9c480c64 (diff)
downloadnixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar.gz
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar.bz2
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar.lz
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar.xz
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.tar.zst
nixlib-4e62f9810aab1e90229390af3238a3cc5b1f67e4.zip
python310Packages.ibeacon-ble: init at 0.7.3
-rw-r--r--pkgs/development/python-modules/ibeacon-ble/default.nix51
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ibeacon-ble/default.nix b/pkgs/development/python-modules/ibeacon-ble/default.nix
new file mode 100644
index 000000000000..ad58a7153569
--- /dev/null
+++ b/pkgs/development/python-modules/ibeacon-ble/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, home-assistant-bluetooth
+, poetry-core
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "ibeacon-ble";
+  version = "0.7.3";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "Bluetooth-Devices";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-+DPbIIarEAaH1bNzo+FvLp0QpNUPhaJ8nPLdKJKfz0k=";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    home-assistant-bluetooth
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace " --cov=ibeacon_ble --cov-report=term-missing:skip-covered" ""
+  '';
+
+  pythonImportsCheck = [
+    "ibeacon_ble"
+  ];
+
+  meta = with lib; {
+    description = "Library for iBeacon BLE devices";
+    homepage = "https://github.com/Bluetooth-Devices/ibeacon-ble";
+    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 5fc08d1d688a..1a67fbbcccca 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4399,6 +4399,8 @@ in {
 
   iaqualink = callPackage ../development/python-modules/iaqualink { };
 
+  ibeacon-ble = callPackage ../development/python-modules/ibeacon-ble { };
+
   ibis = callPackage ../development/python-modules/ibis { };
 
   ibis-framework = callPackage ../development/python-modules/ibis-framework { };