From 5169dc5d8a5554393e899a76fbc2a7c0cda98994 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Jan 2024 08:55:08 +0100 Subject: [PATCH 1/3] python311Packages.lsprotocol: refactor --- pkgs/development/python-modules/lsprotocol/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ]; }; From 3700dade29eeae5ad8355f7d53212ca74df84033 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Jan 2024 08:58:29 +0100 Subject: [PATCH 2/3] python311Packages.pygls: add optional-dependencies --- pkgs/development/python-modules/pygls/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pygls/default.nix b/pkgs/development/python-modules/pygls/default.nix index 74e5b243e60b..721dbc3ed1e2 100644 --- a/pkgs/development/python-modules/pygls/default.nix +++ b/pkgs/development/python-modules/pygls/default.nix @@ -8,12 +8,13 @@ , typeguard , pytest-asyncio , pytestCheckHook +, websockets }: buildPythonPackage rec { pname = "pygls"; version = "1.2.1"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -33,6 +34,12 @@ buildPythonPackage rec { typeguard ]; + passthru.optional-dependencies = { + ws = [ + websockets + ]; + }; + nativeCheckInputs = [ pytest-asyncio pytestCheckHook @@ -46,12 +53,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 ]; }; From 86788629f955d33666ad894062c8da19df392250 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 24 Jan 2024 09:01:32 +0100 Subject: [PATCH 3/3] python311Packages.pygls: relax lsprotocol --- pkgs/development/python-modules/pygls/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pygls/default.nix b/pkgs/development/python-modules/pygls/default.nix index 721dbc3ed1e2..9903e104034c 100644 --- a/pkgs/development/python-modules/pygls/default.nix +++ b/pkgs/development/python-modules/pygls/default.nix @@ -1,13 +1,14 @@ { lib , stdenv , buildPythonPackage -, pythonOlder , fetchFromGitHub -, poetry-core , lsprotocol -, typeguard +, poetry-core , pytest-asyncio , pytestCheckHook +, pythonOlder +, pythonRelaxDepsHook +, typeguard , websockets }: @@ -25,8 +26,14 @@ buildPythonPackage rec { hash = "sha256-ARez9fs50kScfMp/W/aFIOcJonpFrcfyrzJuVwou7fk="; }; + pythonRelaxDeps = [ + # https://github.com/openlawlibrary/pygls/pull/432 + "lsprotocol" + ]; + nativeBuildInputs = [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = [