diff --git a/pkgs/development/python-modules/can/default.nix b/pkgs/development/python-modules/can/default.nix index 28dffc369720..c3d36290168f 100644 --- a/pkgs/development/python-modules/can/default.nix +++ b/pkgs/development/python-modules/can/default.nix @@ -12,11 +12,12 @@ , pythonOlder , typing-extensions , wrapt +, uptime }: buildPythonPackage rec { pname = "can"; - version = "4.0.0"; + version = "4.1.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -24,30 +25,41 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "hardbyte"; repo = "python-can"; - rev = "refs/tags/${version}"; - hash = "sha256-/z7zBfVbO7x4UtzWOXolH2YrtYWgsvRLObWwz8sqOEc="; + rev = "refs/tags/v${version}"; + hash = "sha256-jNy47SapujTF3ReJtIbwUY53IftIH4cXZjkzHrnZMFQ="; }; + postPatch = '' + substituteInPlace tox.ini \ + --replace " --cov=can --cov-config=tox.ini --cov-report=lcov --cov-report=term" "" + ''; + propagatedBuildInputs = [ msgpack packaging - pyserial typing-extensions wrapt ]; + passthru.optional-dependencies = { + serial = [ + pyserial + ]; + seeedstudio = [ + pyserial + ]; + pcan = [ + uptime + ]; + }; + checkInputs = [ future hypothesis parameterized pytest-timeout pytestCheckHook - ]; - - postPatch = '' - substituteInPlace tox.ini \ - --replace " --cov=can --cov-config=tox.ini --cov-report=xml --cov-report=term" "" - ''; + ] ++ passthru.optional-dependencies.serial; disabledTestPaths = [ # We don't support all interfaces