Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / python-lsp-jsonrpc / default.nix
blob27057d92ea12bf685c8b686ca1c8e9005d4b44b3
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   SETUPTOOLS_SCM_PRETEND_VERSION = version;
27   postPatch = ''
28     substituteInPlace pyproject.toml \
29       --replace "--cov-report html --cov-report term --junitxml=pytest.xml --cov pylsp_jsonrpc --cov test" ""
30   '';
32   nativeBuildInputs = [
33     setuptools
34     setuptools-scm
35   ];
37   propagatedBuildInputs = [
38     ujson
39   ];
41   nativeCheckInputs = [
42     pytestCheckHook
43   ];
45   pythonImportsCheck = [
46     "pylsp_jsonrpc"
47   ];
49   meta = with lib; {
50     description = "Python server implementation of the JSON RPC 2.0 protocol";
51     homepage = "https://github.com/python-lsp/python-lsp-jsonrpc";
52     changelog = "https://github.com/python-lsp/python-lsp-jsonrpc/blob/v${version}/CHANGELOG.md";
53     license = licenses.mit;
54     maintainers = with maintainers; [ fab ];
55   };