From 9ae3e2e2457f34f5f8dd37c0a92ade2b3029f38b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 22 Dec 2023 07:34:21 +0000 Subject: [PATCH 1/2] python310Packages.python-lsp-black: 1.3.0 -> 2.0.0 --- pkgs/development/python-modules/python-lsp-black/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-black/default.nix b/pkgs/development/python-modules/python-lsp-black/default.nix index 63caba5e9d02..037c2f688e60 100644 --- a/pkgs/development/python-modules/python-lsp-black/default.nix +++ b/pkgs/development/python-modules/python-lsp-black/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "python-lsp-black"; - version = "1.3.0"; + version = "2.0.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "python-lsp"; repo = "python-lsp-black"; rev = "refs/tags/v${version}"; - hash = "sha256-16HjNB0VfrXLyVa+u5HaFNjq/ER2yXIWokMFsPgejr8="; + hash = "sha256-nV6mePSWzfPW2RwXg/mxgzfT9wD95mmTuPnPEro1kEY="; }; nativeCheckInputs = [ pytestCheckHook ]; From 501f5f28b9b57e6eec705f1c42932dc5961c568a Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 23 Dec 2023 00:04:23 +0900 Subject: [PATCH 2/2] python310Packages.python-lsp-black: refactor --- .../python-lsp-black/default.nix | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-black/default.nix b/pkgs/development/python-modules/python-lsp-black/default.nix index 037c2f688e60..59b4cdaa76f0 100644 --- a/pkgs/development/python-modules/python-lsp-black/default.nix +++ b/pkgs/development/python-modules/python-lsp-black/default.nix @@ -5,14 +5,15 @@ , pytestCheckHook , black , python-lsp-server -, toml +, setuptools +, tomli }: buildPythonPackage rec { pname = "python-lsp-black"; version = "2.0.0"; - format = "setuptools"; - disabled = pythonOlder "3.6"; + pyproject = true; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "python-lsp"; @@ -21,13 +22,27 @@ buildPythonPackage rec { hash = "sha256-nV6mePSWzfPW2RwXg/mxgzfT9wD95mmTuPnPEro1kEY="; }; + nativeBuildInputs = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ]; - propagatedBuildInputs = [ black python-lsp-server toml ]; + propagatedBuildInputs = [ + black + python-lsp-server + ] ++ lib.optionals (pythonOlder "3.11") [ + tomli + ]; + + pythonImportsCheck = [ + "pylsp_black" + ]; meta = with lib; { homepage = "https://github.com/python-lsp/python-lsp-black"; description = "Black plugin for the Python LSP Server"; + changelog = "https://github.com/python-lsp/python-lsp-black/blob/${src.rev}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ cpcloud ]; };