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
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pytest-asyncio,
|
|
pytest-xdist,
|
|
pytestCheckHook,
|
|
poetry-core,
|
|
toml,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "librouteros";
|
|
version = "3.4.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "luqasz";
|
|
repo = "librouteros";
|
|
tag = version;
|
|
hash = "sha256-vN12LYqFOU7flD6bTFtGw5VhPJ238pZ0MStM3ljwDU4=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [ toml ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Disable tests which require QEMU to run
|
|
"test_login"
|
|
"test_long_word"
|
|
"test_query"
|
|
"test_add_then_remove"
|
|
"test_add_then_update"
|
|
"test_generator_ditch"
|
|
];
|
|
|
|
pythonImportsCheck = [ "librouteros" ];
|
|
|
|
meta = {
|
|
description = "Python implementation of the MikroTik RouterOS API";
|
|
homepage = "https://librouteros.readthedocs.io/";
|
|
changelog = "https://github.com/luqasz/librouteros/blob/${version}/CHANGELOG.rst";
|
|
license = lib.licenses.gpl2Only;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|