2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
pillow,
|
2021-07-17 21:14:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "python-ev3dev2";
|
2021-07-17 21:14:59 +00:00
|
|
|
version = "2.1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-07-17 21:14:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ev3dev";
|
|
|
|
repo = "ev3dev-lang-python";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
echo "${version}" > RELEASE-VERSION
|
2021-07-17 21:14:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pillow ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
chmod -R g+rw ./tests/fake-sys/devices/**/*
|
|
|
|
${python.interpreter} -W ignore::ResourceWarning tests/api_tests.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python language bindings for ev3dev";
|
|
|
|
homepage = "https://github.com/ev3dev/ev3dev-lang-python";
|
|
|
|
license = with licenses; [ mit ];
|
2022-02-20 05:27:41 +00:00
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
2021-07-17 21:14:59 +00:00
|
|
|
};
|
|
|
|
}
|