1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 stdenv, 7}: 8 9buildPythonPackage rec { 10 pname = "cv2_enumerate_cameras"; 11 version = "1.3.0"; 12 13 src = fetchFromGitHub { 14 owner = "lukehugh"; 15 repo = "cv2_enumerate_cameras"; 16 tag = "v${version}"; 17 hash = "sha256-pIqT5GEEyRIVHjWd9nNSI4oEvsPjOe2mPC3GWxEdonw="; 18 }; 19 20 pyproject = true; 21 build-system = [ setuptools ]; 22 23 pythonImportsCheck = [ "cv2_enumerate_cameras" ]; 24 25 meta = { 26 homepage = "https://github.com/lukehugh/cv2_enumerate_cameras"; 27 description = "Retrieve the connected camera's name, VID, PID, and the corresponding OpenCV index"; 28 license = lib.licenses.mit; 29 maintainers = [ lib.maintainers.qyliss ]; 30 # Needs pyobjc-framework-avfoundation; not currently packaged. 31 broken = stdenv.hostPlatform.isDarwin; 32 }; 33}