depot/third_party/nixpkgs/pkgs/development/python-modules/ev3dev2/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

37 lines
817 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, pillow
}:
buildPythonPackage rec {
pname = "ev3dev2";
version = "2.1.0";
src = fetchFromGitHub {
owner = "ev3dev";
repo = "ev3dev-lang-python";
rev = version;
sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc=";
fetchSubmodules = true;
};
postPatch = ''
echo "${version}\n" > RELEASE-VERSION
'';
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 ];
maintainers = with maintainers; [ emilytrau ];
};
}