Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.1 kB · 104 lines
Nix
at gcc-offload
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105{ lib, stdenv, buildPythonPackage, fetchFromGitHub, callPackage, cargo, hypothesmith, libcst, libiconv, pytestCheckHook, python, pythonOlder, pyyaml, rustPlatform, rustc, setuptools-rust, setuptools-scm, typing-extensions, typing-inspect, ufmt,}:
buildPythonPackage rec { pname = "libcst"; version = "1.5.1"; pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub { owner = "Instagram"; repo = "LibCST"; rev = "refs/tags/v${version}"; hash = "sha256-fveY4ah94pv9ImI36MNrrxTpZv/DtLb45pXm67L8/GA="; };
cargoDeps = rustPlatform.fetchCargoTarball { inherit src; sourceRoot = "${src.name}/${cargoRoot}"; name = "${pname}-${version}"; hash = "sha256-TcWGW1RF2se89BtvQHO+4BwnRMZ8ygqO3du9Q/gZi/Q="; };
cargoRoot = "native";
build-system = [ setuptools-rust setuptools-scm ];
nativeBuildInputs = [ rustPlatform.cargoSetupHook cargo rustc ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
dependencies = [ typing-extensions typing-inspect pyyaml ];
nativeCheckInputs = [ hypothesmith pytestCheckHook ufmt ];
preCheck = '' # import from $out instead rm libcst/__init__.py '';
disabledTests = [ # FIXME package pyre-test "TypeInferenceProviderTest" # we'd need to run `python -m libcst.codegen.generate all` but shouldn't modify $out "test_codegen_clean_visitor_functions" ];
# circular dependency on hypothesmith and ufmt doCheck = false;
passthru.tests = { pytest = libcst.overridePythonAttrs { doCheck = true; }; };
pythonImportsCheck = [ "libcst" ];
meta = { description = "Concrete Syntax Tree (CST) parser and serializer library for Python"; homepage = "https://github.com/Instagram/LibCST"; changelog = "https://github.com/Instagram/LibCST/blob/v${version}/CHANGELOG.md"; license = with lib.licenses; [ mit asl20 psfl ]; maintainers = with lib.maintainers; [ dotlambda ]; };}