1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 flit-scm,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "ssdp";
13 version = "1.3.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "codingjoe";
20 repo = pname;
21 rev = "refs/tags/${version}";
22 hash = "sha256-mORjMEg7Q/2CKZBLICSGF8dcdl98S6mBgJ4jujPGs6M=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace "--cov" ""
28 '';
29
30 nativeBuildInputs = [
31 flit-core
32 flit-scm
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 pythonImportsCheck = [ "ssdp" ];
38
39 meta = with lib; {
40 description = "Python asyncio library for Simple Service Discovery Protocol (SSDP)";
41 mainProgram = "ssdp";
42 homepage = "https://github.com/codingjoe/ssdp";
43 changelog = "https://github.com/codingjoe/ssdp/releases/tag/${version}";
44 license = licenses.mit;
45 maintainers = with maintainers; [ fab ];
46 };
47}