summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix
blob: d45febae139ce4c7976b2c91b526e4c0c19a4485 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
  ];

  nativeCheckInputs = [
    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 ];
  };
}