about summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-lsp-jsonrpc
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-07-03 13:10:19 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-07-03 13:10:19 +0200
commit14da51500d417ab901402fca0aa3c19e03b77e84 (patch)
tree93b4755a82c6d329bd7059fb1c3dc832d2b325b0 /pkgs/development/python-modules/python-lsp-jsonrpc
parenta143a6dd34cd72fe24962988c7eccb97b1173fac (diff)
python3Packages.python-lsp-jsonrpc: init at 1.0.0
Diffstat (limited to 'pkgs/development/python-modules/python-lsp-jsonrpc')
-rw-r--r--pkgs/development/python-modules/python-lsp-jsonrpc/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix b/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix
new file mode 100644
index 0000000000000..6938bc282f880
--- /dev/null
+++ b/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, ujson
+}:
+
+buildPythonPackage rec {
+  pname = "python-lsp-jsonrpc";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "python-lsp";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0h4bs8s4axcm0p02v59amz9sq3nr4zhzdgwq7iaw6awl27v1hd0i";
+  };
+
+  propagatedBuildInputs = [
+    ujson
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \
+      --replace "--cov pylsp_jsonrpc --cov test" ""
+  '';
+
+  pythonImportsCheck = [ "pylsp_jsonrpc" ];
+
+  meta = with lib; {
+    description = "Python server implementation of the JSON RPC 2.0 protocol.";
+    homepage = "https://github.com/python-lsp/python-lsp-jsonrpc";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}