1{ lib
2, buildPythonPackage
3, fetchPypi
4, pyusb
5}:
6
7buildPythonPackage rec {
8 pname = "blinkstick";
9 version = "1.2.0";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "0rdk3i81s6byw23za0bxvkh7sj5l16qxxgc2c53qjg3klc24wcm9";
14 };
15
16 # Upstream fix https://github.com/arvydas/blinkstick-python/pull/54
17 # https://github.com/arvydas/blinkstick-python/pull/54/commits/b9bee2cd72f799f1210e5d9e13207f93bbc2d244.patch
18 # has line ending issues after 1.2.0
19 postPatch = ''
20 substituteInPlace setup.py --replace "pyusb==1.0.0" "pyusb>=1.0.0"
21 '';
22
23 propagatedBuildInputs = [ pyusb ];
24
25 # Project has no tests
26 doCheck = false;
27 pythonImportsCheck = [ "blinkstick" ];
28
29 meta = with lib; {
30 description = "Python package to control BlinkStick USB devices";
31 homepage = "https://github.com/arvydas/blinkstick-python";
32 license = licenses.bsd3;
33 maintainers = with maintainers; [ np ];
34 };
35}