diff --git a/pkgs/development/python-modules/can/default.nix b/pkgs/development/python-modules/can/default.nix index f0b221e5adff..c3d36290168f 100644 --- a/pkgs/development/python-modules/can/default.nix +++ b/pkgs/development/python-modules/can/default.nix @@ -12,42 +12,54 @@ , pythonOlder , typing-extensions , wrapt +, uptime }: buildPythonPackage rec { - pname = "python-can"; - version = "4.0.0"; + pname = "can"; + version = "4.1.0"; format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "hardbyte"; - repo = pname; - rev = version; - hash = "sha256-/z7zBfVbO7x4UtzWOXolH2YrtYWgsvRLObWwz8sqOEc="; + repo = "python-can"; + 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 @@ -74,6 +86,7 @@ buildPythonPackage rec { meta = with lib; { description = "CAN support for Python"; homepage = "https://python-can.readthedocs.io"; + changelog = "https://github.com/hardbyte/python-can/releases/tag/v${version}"; license = licenses.lgpl3Only; maintainers = with maintainers; [ fab sorki ]; };