diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix new file mode 100644 index 000000000000..b19fad1a1f19 --- /dev/null +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -0,0 +1,32 @@ +{ 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 + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6fc3a140eb81..26c1215ae019 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11003,10 +11003,12 @@ in { python-language-server = callPackage ../development/python-modules/python-language-server {}; - pyls-mypy = callPackage ../development/python-modules/pyls-mypy {}; + pyls-black = callPackage ../development/python-modules/pyls-black {}; pyls-isort = callPackage ../development/python-modules/pyls-isort {}; + pyls-mypy = callPackage ../development/python-modules/pyls-mypy {}; + pyudev = callPackage ../development/python-modules/pyudev { inherit (pkgs) systemd; };