depot/third_party/nixpkgs/pkgs/development/python-modules/lsprotocol/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

74 lines
1.1 KiB
Nix

{ lib
, attrs
, buildPythonPackage
, cattrs
, fetchFromGitHub
, flit-core
, jsonschema
, nox
, pyhamcrest
, pytest
, pythonOlder
}:
buildPythonPackage rec {
pname = "lsprotocol";
version = "2023.0.0a1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "microsoft";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-gfsqn9NtO7meMks4dUhrTYVlr69Ffh339GD9FvCJvJM=";
};
nativeBuildInputs = [
flit-core
nox
];
propagatedBuildInputs = [
attrs
cattrs
];
nativeCheckInputs = [
pytest
];
checkInputs = [
jsonschema
pyhamcrest
];
preBuild = ''
cd packages/python
'';
preCheck = ''
cd ../../
'';
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 ];
};
}