1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 python, 6 pillow, 7}: 8 9buildPythonPackage rec { 10 pname = "python-ev3dev2"; 11 version = "2.1.0"; 12 format = "setuptools"; 13 14 src = fetchFromGitHub { 15 owner = "ev3dev"; 16 repo = "ev3dev-lang-python"; 17 rev = version; 18 sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc="; 19 fetchSubmodules = true; 20 }; 21 22 postPatch = '' 23 echo "${version}" > RELEASE-VERSION 24 ''; 25 26 propagatedBuildInputs = [ pillow ]; 27 28 checkPhase = '' 29 chmod -R g+rw ./tests/fake-sys/devices/**/* 30 ${python.interpreter} -W ignore::ResourceWarning tests/api_tests.py 31 ''; 32 33 meta = with lib; { 34 description = "Python language bindings for ev3dev"; 35 homepage = "https://github.com/ev3dev/ev3dev-lang-python"; 36 license = with licenses; [ mit ]; 37 maintainers = with maintainers; [ emilytrau ]; 38 }; 39}