From d347164e04b75220747a236d6fc5d156dce2d313 Mon Sep 17 00:00:00 2001 From: Daniel Edgecumbe Date: Mon, 4 Jan 2021 17:03:58 +0000 Subject: [PATCH] libcst: fix python 3.6 support The 'dataclasses' module is a required dependency of libcst. Python >= 3.7 include this module natively. --- pkgs/development/python-modules/libcst/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libcst/default.nix b/pkgs/development/python-modules/libcst/default.nix index e0ea0e332af6..f064c34e1586 100644 --- a/pkgs/development/python-modules/libcst/default.nix +++ b/pkgs/development/python-modules/libcst/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, pythonOlder, black, isort -, pytestCheckHook, pyyaml, typing-extensions, typing-inspect }: +, pytestCheckHook, pyyaml, typing-extensions, typing-inspect, dataclasses }: buildPythonPackage rec { pname = "libcst"; @@ -16,7 +16,8 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; - propagatedBuildInputs = [ pyyaml typing-inspect ]; + propagatedBuildInputs = [ pyyaml typing-inspect ] + ++ lib.optional (pythonOlder "3.7") dataclasses; checkInputs = [ black isort pytestCheckHook ];