mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "discovery30303";
|
|
version = "0.3.2";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdraco";
|
|
repo = "discovery30303";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-P31P5GjIrMotdIXqqZ6LCbk5MIl2Kq4MzlWDw+aOcrE=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail " --cov=discovery30303" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [ poetry-core ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
|
|
|
pythonImportsCheck = [ "discovery30303" ];
|
|
|
|
meta = with lib; {
|
|
description = "Module to discover devices that respond on port 30303";
|
|
homepage = "https://github.com/bdraco/discovery30303";
|
|
changelog = "https://github.com/bdraco/discovery30303/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|