Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-lsp-jsonrpc / default.nix
blob040d901a7e73f826693b6af82d95ea3124889d43
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 , setuptools
7 , setuptools-scm
8 , ujson
9 }:
11 buildPythonPackage rec {
12   pname = "python-lsp-jsonrpc";
13   version = "1.1.2";
14   format = "pyproject";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "python-lsp";
20     repo = pname;
21     rev = "refs/tags/v${version}";
22     hash = "sha256-5WN/31e6WCgXVzevMuQbNjyo/2jjWDF+m48nrLKS+64=";
23   };
25   postPatch = ''
26     substituteInPlace pyproject.toml \
27       --replace "--cov-report html --cov-report term --junitxml=pytest.xml --cov pylsp_jsonrpc --cov test" ""
28   '';
30   nativeBuildInputs = [
31     setuptools
32     setuptools-scm
33   ];
35   propagatedBuildInputs = [
36     ujson
37   ];
39   nativeCheckInputs = [
40     pytestCheckHook
41   ];
43   pythonImportsCheck = [
44     "pylsp_jsonrpc"
45   ];
47   meta = with lib; {
48     description = "Python server implementation of the JSON RPC 2.0 protocol";
49     homepage = "https://github.com/python-lsp/python-lsp-jsonrpc";
50     changelog = "https://github.com/python-lsp/python-lsp-jsonrpc/blob/v${version}/CHANGELOG.md";
51     license = licenses.mit;
52     maintainers = with maintainers; [ fab ];
53   };