24 buildPythonPackage rec {
29 disabled = pythonOlder "3.9";
31 src = fetchFromGitHub {
34 rev = "refs/tags/v${version}";
35 hash = "sha256-H0YO8ILWOyhYdosNRWQQ9wziFk0syKSG3vF2zuYkL2k=";
38 cargoDeps = rustPlatform.fetchCargoTarball {
40 sourceRoot = "${src.name}/${cargoRoot}";
41 name = "${pname}-${version}";
42 hash = "sha256-AcqHn3A7WCVyVnOBD96k4pxokhzgmCWOipK/DrIAQkU=";
53 rustPlatform.cargoSetupHook
58 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
73 # import from $out instead
78 # FIXME package pyre-test
79 "TypeInferenceProviderTest"
80 # we'd need to run `python -m libcst.codegen.generate all` but shouldn't modify $out
81 "test_codegen_clean_visitor_functions"
84 # circular dependency on hypothesmith and ufmt
88 pytest = libcst.overridePythonAttrs { doCheck = true; };
91 pythonImportsCheck = [ "libcst" ];
94 description = "Concrete Syntax Tree (CST) parser and serializer library for Python";
95 homepage = "https://github.com/Instagram/libcst";
96 changelog = "https://github.com/Instagram/LibCST/blob/v${version}/CHANGELOG.md";
97 license = with lib.licenses; [
102 maintainers = with lib.maintainers; [ dotlambda ];