1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
81 lines
1.5 KiB
Nix
81 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
attrs,
|
|
buildPythonPackage,
|
|
click,
|
|
fetchFromGitHub,
|
|
ldfparser,
|
|
lxml,
|
|
openpyxl,
|
|
pytest-cov-stub,
|
|
pytest-timeout,
|
|
pytestCheckHook,
|
|
pyyaml,
|
|
setuptools,
|
|
xlrd,
|
|
xlwt,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "canmatrix";
|
|
version = "1.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ebroecker";
|
|
repo = "canmatrix";
|
|
tag = version;
|
|
hash = "sha256-PfegsFha7ernSqnMeaDoLf1jLx1CiOoiYi34dESEgBY=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
attrs
|
|
click
|
|
];
|
|
|
|
optional-dependencies = {
|
|
arxml = [ lxml ];
|
|
fibex = [ lxml ];
|
|
kcd = [ lxml ];
|
|
ldf = [ ldfparser ];
|
|
odx = [ lxml ];
|
|
xls = [
|
|
xlrd
|
|
xlwt
|
|
];
|
|
xlsx = [ openpyxl ];
|
|
yaml = [ pyyaml ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-cov-stub
|
|
pytest-timeout
|
|
pytestCheckHook
|
|
]
|
|
++ lib.concatAttrValues optional-dependencies;
|
|
|
|
pytestFlags = [
|
|
# long_envvar_name_imports requires stable key value pair ordering
|
|
"-s"
|
|
];
|
|
|
|
enabledTestPaths = [
|
|
"src/canmatrix"
|
|
"tests/"
|
|
];
|
|
|
|
disabledTests = [ "long_envvar_name_imports" ];
|
|
|
|
pythonImportsCheck = [ "canmatrix" ];
|
|
|
|
meta = {
|
|
description = "Support and convert several CAN (Controller Area Network) database formats";
|
|
homepage = "https://github.com/ebroecker/canmatrix";
|
|
changelog = "https://github.com/ebroecker/canmatrix/releases/tag/${version}";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ sorki ];
|
|
};
|
|
}
|