summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyls-black/default.nix
blob: 60f6af28765260826e7999fc2042dbda34ca09ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, buildPythonPackage, fetchFromGitHub
, black, toml, pytest, python-language-server, isPy3k
}:

buildPythonPackage rec {
  pname = "pyls-black";
  version = "0.2.1";

  src = fetchFromGitHub {
    owner = "rupert";
    repo = "pyls-black";
    rev = "v${version}";
    sha256 = "0xa3iv8nhnj0lw0dh41qb0dqp55sb6rdxalbk60v8jll6qyc0si8";
  };

  disabled = !isPy3k;

  checkPhase = ''
    pytest
  '';

  # Enable when https://github.com/rupert/pyls-black/pull/6 is merged.
  doCheck = false;

  checkInputs = [ pytest ];

  propagatedBuildInputs = [ black toml python-language-server ];

  meta = with lib; {
    homepage = https://github.com/rupert/pyls-black;
    description = "Black plugin for the Python Language Server";
    license = licenses.mit;
    maintainers = [ maintainers.mic92 ];
  };
}