about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycyphal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pycyphal/default.nix')
-rw-r--r--pkgs/development/python-modules/pycyphal/default.nix46
1 files changed, 19 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/pycyphal/default.nix b/pkgs/development/python-modules/pycyphal/default.nix
index 9067a3f06ad5..5dc9dec21247 100644
--- a/pkgs/development/python-modules/pycyphal/default.nix
+++ b/pkgs/development/python-modules/pycyphal/default.nix
@@ -1,16 +1,16 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, pythonOlder
-, can
-, cobs
-, libpcap
-, nunavut
-, numpy
-, pyserial
-, pytestCheckHook
-, pytest-asyncio
-, setuptools
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  pythonOlder,
+  python-can,
+  cobs,
+  libpcap,
+  nunavut,
+  numpy,
+  pyserial,
+  pytestCheckHook,
+  pytest-asyncio,
 }:
 
 buildPythonPackage rec {
@@ -33,25 +33,19 @@ buildPythonPackage rec {
     nunavut
   ];
 
-  passthru.optional-dependencies = {
-    transport-can-pythoncan = [
-      can
-    ] ++ can.optional-dependencies.serial;
+  optional-dependencies = {
+    transport-can-pythoncan = [ python-can ] ++ python-can.optional-dependencies.serial;
     transport-serial = [
       cobs
       pyserial
     ];
-    transport-udp = [
-      libpcap
-    ];
+    transport-udp = [ libpcap ];
   };
 
   nativeCheckInputs = [
     pytestCheckHook
     pytest-asyncio
-  ] ++ builtins.foldl' (x: y: x ++ y) [ ]
-    (builtins.attrValues passthru.optional-dependencies)
-  ;
+  ] ++ builtins.foldl' (x: y: x ++ y) [ ] (builtins.attrValues optional-dependencies);
 
   preCheck = ''
     export HOME=$TMPDIR
@@ -82,12 +76,10 @@ buildPythonPackage rec {
     "tests/transport"
   ];
 
-  pythonImportsCheck = [
-    "pycyphal"
-  ];
+  pythonImportsCheck = [ "pycyphal" ];
 
   meta = with lib; {
-    description = "A full-featured implementation of the Cyphal protocol stack in Python";
+    description = "Full-featured implementation of the Cyphal protocol stack in Python";
     longDescription = ''
       Cyphal is an open technology for real-time intravehicular distributed computing and communication based on modern networking standards (Ethernet, CAN FD, etc.).
     '';