1{ lib, buildPythonPackage, fetchFromGitHub
2, black, toml, pytest, python-language-server, isPy3k
3}:
4
5buildPythonPackage rec {
6 pname = "pyls-black";
7 version = "0.4.6";
8
9 src = fetchFromGitHub {
10 owner = "rupert";
11 repo = "pyls-black";
12 rev = "v${version}";
13 sha256 = "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj";
14 };
15
16 disabled = !isPy3k;
17
18 checkPhase = ''
19 pytest
20 '';
21
22 checkInputs = [ pytest ];
23
24 propagatedBuildInputs = [ black toml python-language-server ];
25
26 meta = with lib; {
27 homepage = "https://github.com/rupert/pyls-black";
28 description = "Black plugin for the Python Language Server";
29 license = licenses.mit;
30 maintainers = [ maintainers.mic92 ];
31 };
32}