2021-02-09 19:04:47 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pyusb
|
|
|
|
}:
|
2018-02-27 20:41:08 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "BlinkStick";
|
2021-02-09 19:04:47 +00:00
|
|
|
version = "1.2.0";
|
2018-02-27 20:41:08 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-09 19:04:47 +00:00
|
|
|
sha256 = "0rdk3i81s6byw23za0bxvkh7sj5l16qxxgc2c53qjg3klc24wcm9";
|
2018-02-27 20:41:08 +00:00
|
|
|
};
|
|
|
|
|
2021-02-09 19:04:47 +00:00
|
|
|
# Upstream fix https://github.com/arvydas/blinkstick-python/pull/54
|
|
|
|
# https://github.com/arvydas/blinkstick-python/pull/54/commits/b9bee2cd72f799f1210e5d9e13207f93bbc2d244.patch
|
|
|
|
# has line ending issues after 1.2.0
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "pyusb==1.0.0" "pyusb>=1.0.0"
|
|
|
|
'';
|
2018-02-27 20:43:30 +00:00
|
|
|
|
2018-02-27 20:41:08 +00:00
|
|
|
propagatedBuildInputs = [ pyusb ];
|
|
|
|
|
2021-02-09 19:04:47 +00:00
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "blinkstick" ];
|
|
|
|
|
2018-02-27 20:41:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to control BlinkStick USB devices";
|
2021-02-09 19:04:47 +00:00
|
|
|
homepage = "https://github.com/arvydas/blinkstick-python";
|
2018-02-27 20:41:08 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ np ];
|
|
|
|
};
|
|
|
|
}
|