15 rustPlatform.buildRustPackage rec {
19 src = fetchFromGitHub {
22 rev = "refs/tags/v${version}";
23 hash = "sha256-jj9r5npClLY9mhDHFI92825RYvwn6m9KlngfFL0bqCw=";
27 lockFile = ./Cargo.lock;
29 "rustpython-ast-0.4.0" = "sha256-RChZlXzdzyLp0Lb/LTLbWfbUzPDhmWkf0uVobflCKRk=";
37 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (writeScriptBin "diskutil" "") ];
44 export HOME=$(mktemp -d)
49 cp -r $HOME/.erg/ $out/lib/erg
52 nativeCheckInputs = [ which ];
56 # this test causes stack overflow
57 # > thread 'exec_import' has overflowed its stack
60 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
61 # Dict({Str..Obj: Int}) does not implement Iterable(Str..Obj..Obj) and Indexable({"a"}..Obj, Int)
62 # https://github.com/mtshiba/pylyzer/issues/114
67 wrapProgram $out/bin/pylyzer --set ERG_PATH $out/lib/erg
70 nativeInstallCheckInputs = [
73 versionCheckProgramArg = [ "--version" ];
74 doInstallCheck = true;
77 updateScript = nix-update-script { };
81 description = "Fast static code analyzer & language server for Python";
82 homepage = "https://github.com/mtshiba/pylyzer";
83 changelog = "https://github.com/mtshiba/pylyzer/releases/tag/v${version}";
84 license = lib.licenses.mit;
85 maintainers = with lib.maintainers; [ natsukium ];
86 mainProgram = "pylyzer";