1{ lib, buildPythonPackage, fetchFromGitHub
2, black, toml, pytest, python-language-server, isPy3k
3}:
4
5buildPythonPackage rec {
6 pname = "pyls-black";
7 version = "0.2.1";
8
9 src = fetchFromGitHub {
10 owner = "rupert";
11 repo = "pyls-black";
12 rev = "v${version}";
13 sha256 = "0xa3iv8nhnj0lw0dh41qb0dqp55sb6rdxalbk60v8jll6qyc0si8";
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}