diff --git a/pkgs/development/python-modules/lsprotocol/default.nix b/pkgs/development/python-modules/lsprotocol/default.nix new file mode 100644 index 000000000000..4cd00f771d8e --- /dev/null +++ b/pkgs/development/python-modules/lsprotocol/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flit-core +, cattrs +, attrs +, nox +, pytest +, pyhamcrest +, jsonschema +}: + +buildPythonPackage rec { + pname = "lsprotocol"; + version = "2022.0.0a9"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = pname; + rev = version; + hash = "sha256-6XecPKuBhwtkmZrGozzO+VEryI5wwy9hlvWE1oV6ajk="; + }; + + nativeBuildInputs = [ + flit-core + nox + ]; + + propagatedBuildInputs = [ + cattrs + attrs + ]; + + checkInputs = [ + pytest + pyhamcrest + jsonschema + ]; + + checkPhase = '' + runHook preCheck + + sed -i "/^ _install_requirements/d" noxfile.py + nox --session tests + + runHook postCheck + ''; + + pythonImportsCheck = [ "lsprotocol" ]; + + meta = with lib; { + homepage = "https://github.com/microsoft/lsprotocol"; + description = "Python implementation of the Language Server Protocol."; + license = licenses.mit; + maintainers = with maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b8c5b329e45f..33f22478cbe0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5538,6 +5538,8 @@ self: super: with self; { lsassy = callPackage ../development/python-modules/lsassy { }; + lsprotocol = callPackage ../development/python-modules/lsprotocol { }; + luddite = callPackage ../development/python-modules/luddite { }; ludios_wpull = callPackage ../development/python-modules/ludios_wpull { };