depot/third_party/nixpkgs/pkgs/development/python-modules/cantools/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

66 lines
1.1 KiB
Nix

{ lib
, argparse-addons
, bitstruct
, buildPythonPackage
, can
, crccheck
, diskcache
, fetchPypi
, matplotlib
, parameterized
, pytestCheckHook
, pythonOlder
, setuptools
, setuptools-scm
, textparser
}:
buildPythonPackage rec {
pname = "cantools";
version = "39.4.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-gGmo9HO7FnmZC+oJA/OiLVjfVJWuu/CfWNSfYnURthk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "setuptools_scm>=8" "setuptools_scm"
'';
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
argparse-addons
bitstruct
can
crccheck
diskcache
matplotlib
textparser
];
nativeCheckInputs = [
parameterized
pytestCheckHook
];
pythonImportsCheck = [
"cantools"
];
meta = with lib; {
description = "Tools to work with CAN bus";
homepage = "https://github.com/cantools/cantools";
changelog = "https://github.com/cantools/cantools/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ gray-heron ];
};
}