{ lib, rustPlatform, fetchFromGitHub, versionCheckHook, nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "pyrefly"; version = "0.26.1"; src = fetchFromGitHub { owner = "facebook"; repo = "pyrefly"; tag = finalAttrs.version; hash = "sha256-XjAeCbg4Jgk/5PVnUMzFaJS1Qz24UEnQVV/cXEyUnZU="; }; buildAndTestSubdir = "pyrefly"; cargoHash = "sha256-SadZDZA0B99MGDYGppZvQtThKX3YLMe/lQ2eMLuYMhk="; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; # requires unstable rust features env.RUSTC_BOOTSTRAP = 1; passthru.updateScript = nix-update-script { }; meta = { description = "Fast type checker and IDE for Python"; homepage = "https://github.com/facebook/pyrefly"; license = lib.licenses.mit; mainProgram = "pyrefly"; platforms = lib.platforms.linux ++ lib.platforms.darwin; maintainers = with lib.maintainers; [ cybardev QuiNzX ]; }; })