about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pygls/default.nix31
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pygls/default.nix b/pkgs/development/python-modules/pygls/default.nix
new file mode 100644
index 000000000000..962803402e6e
--- /dev/null
+++ b/pkgs/development/python-modules/pygls/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub
+, mock, pytest, pytest-asyncio
+}:
+
+buildPythonPackage rec {
+  pname = "pygls";
+  version = "0.8.1";
+  disabled = !isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "openlawlibrary";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1853rfdks5n8nw6ig96j7his5kqd75hrvzvd0win4niycaqsag6m";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "pytest==4.5.0" "pytest"
+  '';
+
+  checkInputs = [ mock pytest pytest-asyncio ];
+  checkPhase = "pytest";
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/openlawlibrary/pygls";
+    description = "Pythonic generic implementation of the Language Server Protocol";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ metadark ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 8337e538989e..c7ed4871079b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -3288,6 +3288,8 @@ in {
 
   pyfxa = callPackage ../development/python-modules/pyfxa { };
 
+  pygls = callPackage ../development/python-modules/pygls {};
+
   pyhomematic = callPackage ../development/python-modules/pyhomematic { };
 
   pylama = callPackage ../development/python-modules/pylama { };