1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pyserial
5, pyserial-asyncio
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pyblackbird";
11 version = "0.6";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "koolsb";
18 repo = pname;
19 rev = "refs/tags/${version}";
20 hash = "sha256-+ehzrr+RrwFKOOuxBq3+mwnuMPxZFV4QTZG1IRgsbLc=";
21 };
22
23 propagatedBuildInputs = [
24 pyserial
25 pyserial-asyncio
26 ];
27
28 # Test setup try to create a serial port
29 doCheck = false;
30
31 pythonImportsCheck = [
32 "pyblackbird"
33 ];
34
35 meta = with lib; {
36 description = "Python implementation for Monoprice Blackbird units";
37 homepage = "https://github.com/koolsb/pyblackbird";
38 changelog = "https://github.com/koolsb/pyblackbird/releases/tag/${version}";
39 license = with licenses; [ mit ];
40 maintainers = with maintainers; [ fab ];
41 };
42}