about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-04-06 23:46:41 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-04-07 02:45:45 +0200
commit3e1efa384d11e513198608725d3b234fcff9e060 (patch)
tree93263236140f7aeff2ef42921de40082b4e85a4c /pkgs
parente12a1433cc46e0163f2a3d6cb2d2ab3f2af6a208 (diff)
python3Packages.pybluez: use correct upstream, fixes build
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pybluez/default.nix35
-rw-r--r--pkgs/top-level/python-packages.nix4
2 files changed, 27 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/pybluez/default.nix b/pkgs/development/python-modules/pybluez/default.nix
index ae90c21bea9f9..55262a07a4cad 100644
--- a/pkgs/development/python-modules/pybluez/default.nix
+++ b/pkgs/development/python-modules/pybluez/default.nix
@@ -1,32 +1,45 @@
 { lib
+, stdenv
 , buildPythonPackage
 , fetchFromGitHub
-, pkgs
-, isPy3k
+, bluez
+, gattlib
 }:
 
 buildPythonPackage rec {
-  version = "unstable-20160819";
   pname = "pybluez";
-  # requires use2to3, which is no longer supported in setuptools>58
-  disabled = isPy3k;
-
-  propagatedBuildInputs = [ pkgs.bluez ];
+  version = "unstable-2022-01-28";
+  format = "setuptools";
 
   src = fetchFromGitHub {
-    owner = "karulis";
+    owner = pname;
     repo = pname;
-    rev = "a0b226a61b166e170d48539778525b31e47a4731";
-    sha256 = "104dm5ngfhqisv1aszdlr3szcav2g3bhsgzmg4qfs09b3i5zj047";
+    rev = "5096047f90a1f6a74ceb250aef6243e144170f92";
+    hash = "sha256-GA58DfCFaVzZQA1HYpGQ68bznrt4SX1ojyOVn8hyCGo=";
   };
 
-  # the tests do not pass
+  buildInputs = [
+    bluez
+  ];
+
+  propagatedBuildInputs = [
+    gattlib
+  ];
+
+  # there are no tests
   doCheck = false;
 
+  pythonImportsCheck = [
+    "bluetooth"
+    "bluetooth.ble"
+  ];
+
   meta = with lib; {
     description = "Bluetooth Python extension module";
+    homepage = "https://github.com/pybluez/pybluez";
     license = licenses.gpl2;
     maintainers = with maintainers; [ leenaars ];
+    broken = stdenv.isDarwin; # requires pyobjc-core, pyobjc-framework-Cocoa
   };
 
 }
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index cd444fceff129..c0d8272877978 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6767,7 +6767,9 @@ in {
 
   pyblock = callPackage ../development/python-modules/pyblock { };
 
-  pybluez = callPackage ../development/python-modules/pybluez { };
+  pybluez = callPackage ../development/python-modules/pybluez {
+    inherit (pkgs) bluez;
+  };
 
   pybotvac = callPackage ../development/python-modules/pybotvac { };