summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-ev3dev2/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-06-19 06:01:13 +0000
committerGitHub <noreply@github.com>2023-06-19 06:01:13 +0000
commit26a382929f8a57fd76ee7dae41b83b20485f7409 (patch)
treeb8c7fb984aa30837a17f5396b7d70ac4cd291ac4 /pkgs/development/python-modules/python-ev3dev2/default.nix
parentf9d582c9dfe20a6c5e1743847d6cf723a5d14a66 (diff)
parentfcbd2f784cc4f4cf3d2bd988628c03309a832cd9 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules/python-ev3dev2/default.nix')
-rw-r--r--pkgs/development/python-modules/python-ev3dev2/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-ev3dev2/default.nix b/pkgs/development/python-modules/python-ev3dev2/default.nix
new file mode 100644
index 000000000000..b5fc2e4fe537
--- /dev/null
+++ b/pkgs/development/python-modules/python-ev3dev2/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, python
+, pillow
+}:
+
+buildPythonPackage rec {
+ pname = "python-ev3dev2";
+ version = "2.1.0";
+
+ src = fetchFromGitHub {
+ owner = "ev3dev";
+ repo = "ev3dev-lang-python";
+ rev = version;
+ sha256 = "XxsiQs3k5xKb+3RewARbvBbxaztdvdq3w5ZMgTq+kRc=";
+ fetchSubmodules = true;
+ };
+
+ postPatch = ''
+ echo "${version}" > 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 ];
+ };
+}