Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-ev3dev2 / default.nix
blob219678ef24218c1b35c51dbc8a5c0825f59e49d5
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , python
5 , pillow
6 }:
8 buildPythonPackage rec {
9   pname = "python-ev3dev2";
10   version = "2.1.0";
11   format = "setuptools";
13   src = fetchFromGitHub {
14     owner = "ev3dev";
15     repo = "ev3dev-lang-python";
16     rev = version;
17     sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc=";
18     fetchSubmodules = true;
19   };
21   postPatch = ''
22     echo "${version}" > RELEASE-VERSION
23   '';
25   propagatedBuildInputs = [ pillow ];
27   checkPhase = ''
28     chmod -R g+rw ./tests/fake-sys/devices/**/*
29     ${python.interpreter} -W ignore::ResourceWarning tests/api_tests.py
30   '';
32   meta = with lib; {
33     description = "Python language bindings for ev3dev";
34     homepage = "https://github.com/ev3dev/ev3dev-lang-python";
35     license = with licenses; [ mit ];
36     maintainers = with maintainers; [ emilytrau ];
37   };