diff --git a/pkgs/development/python-modules/ssdp/default.nix b/pkgs/development/python-modules/ssdp/default.nix index c34c46c7c08c..270fb07362a2 100644 --- a/pkgs/development/python-modules/ssdp/default.nix +++ b/pkgs/development/python-modules/ssdp/default.nix @@ -1,9 +1,12 @@ { lib, buildPythonPackage, + click, fetchFromGitHub, flit-core, flit-scm, + pygments, + pytest-cov-stub, pytestCheckHook, pythonOlder, }: @@ -11,37 +14,43 @@ buildPythonPackage rec { pname = "ssdp"; version = "1.3.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "codingjoe"; - repo = pname; + repo = "ssdp"; tag = version; hash = "sha256-mORjMEg7Q/2CKZBLICSGF8dcdl98S6mBgJ4jujPGs6M="; }; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace "--cov" "" - ''; - - nativeBuildInputs = [ + build-system = [ flit-core flit-scm ]; - nativeCheckInputs = [ pytestCheckHook ]; + optional-dependencies = { + cli = [ + click + pygments + ]; + pygments = [ pygments ]; + }; + + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "ssdp" ]; meta = with lib; { description = "Python asyncio library for Simple Service Discovery Protocol (SSDP)"; - mainProgram = "ssdp"; homepage = "https://github.com/codingjoe/ssdp"; changelog = "https://github.com/codingjoe/ssdp/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; + mainProgram = "ssdp"; }; }