diff --git a/pkgs/development/python-modules/lsprotocol/default.nix b/pkgs/development/python-modules/lsprotocol/default.nix index ce6e4eea44a3..c8c058f47c68 100644 --- a/pkgs/development/python-modules/lsprotocol/default.nix +++ b/pkgs/development/python-modules/lsprotocol/default.nix @@ -15,13 +15,13 @@ buildPythonPackage rec { pname = "lsprotocol"; version = "2023.0.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "microsoft"; - repo = pname; + repo = "lsprotocol"; rev = "refs/tags/${version}"; hash = "sha256-PHjLKazMaT6W4Lve1xNxm6hEwqE3Lr2m5L7Q03fqb68="; }; @@ -70,6 +70,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python implementation of the Language Server Protocol"; homepage = "https://github.com/microsoft/lsprotocol"; + changelog = "https://github.com/microsoft/lsprotocol/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ doronbehar fab ]; }; diff --git a/pkgs/development/python-modules/pygls/default.nix b/pkgs/development/python-modules/pygls/default.nix index 74e5b243e60b..9903e104034c 100644 --- a/pkgs/development/python-modules/pygls/default.nix +++ b/pkgs/development/python-modules/pygls/default.nix @@ -1,19 +1,21 @@ { lib , stdenv , buildPythonPackage -, pythonOlder , fetchFromGitHub -, poetry-core , lsprotocol -, typeguard +, poetry-core , pytest-asyncio , pytestCheckHook +, pythonOlder +, pythonRelaxDepsHook +, typeguard +, websockets }: buildPythonPackage rec { pname = "pygls"; version = "1.2.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -24,8 +26,14 @@ buildPythonPackage rec { hash = "sha256-ARez9fs50kScfMp/W/aFIOcJonpFrcfyrzJuVwou7fk="; }; + pythonRelaxDeps = [ + # https://github.com/openlawlibrary/pygls/pull/432 + "lsprotocol" + ]; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [ @@ -33,6 +41,12 @@ buildPythonPackage rec { typeguard ]; + passthru.optional-dependencies = { + ws = [ + websockets + ]; + }; + nativeCheckInputs = [ pytest-asyncio pytestCheckHook @@ -46,12 +60,14 @@ buildPythonPackage rec { ulimit -n 1024 ''; - pythonImportsCheck = [ "pygls" ]; + pythonImportsCheck = [ + "pygls" + ]; meta = with lib; { description = "Pythonic generic implementation of the Language Server Protocol"; homepage = "https://github.com/openlawlibrary/pygls"; - changelog = "https://github.com/openlawlibrary/pygls/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/openlawlibrary/pygls/blob/${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ kira-bruneau ]; };