depot/third_party/nixpkgs/pkgs/development/python-modules/lsprotocol/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

66 lines
1.1 KiB
Nix

{ lib
, attrs
, buildPythonPackage
, cattrs
, fetchFromGitHub
, flit-core
, jsonschema
, nox
, pyhamcrest
, pytest
, pythonOlder
}:
buildPythonPackage rec {
pname = "lsprotocol";
version = "2022.0.0a9";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "microsoft";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-6XecPKuBhwtkmZrGozzO+VEryI5wwy9hlvWE1oV6ajk=";
};
nativeBuildInputs = [
flit-core
nox
];
propagatedBuildInputs = [
attrs
cattrs
];
nativeCheckInputs = [
pytest
];
checkInputs = [
jsonschema
pyhamcrest
];
checkPhase = ''
runHook preCheck
sed -i "/^ _install_requirements/d" noxfile.py
nox --session tests
runHook postCheck
'';
pythonImportsCheck = [
"lsprotocol"
];
meta = with lib; {
description = "Python implementation of the Language Server Protocol";
homepage = "https://github.com/microsoft/lsprotocol";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar fab ];
};
}