Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 versionCheckHook, 6 nix-update-script, 7}: 8rustPlatform.buildRustPackage (finalAttrs: { 9 pname = "pyrefly"; 10 version = "0.26.1"; 11 12 src = fetchFromGitHub { 13 owner = "facebook"; 14 repo = "pyrefly"; 15 tag = finalAttrs.version; 16 hash = "sha256-XjAeCbg4Jgk/5PVnUMzFaJS1Qz24UEnQVV/cXEyUnZU="; 17 }; 18 19 buildAndTestSubdir = "pyrefly"; 20 cargoHash = "sha256-SadZDZA0B99MGDYGppZvQtThKX3YLMe/lQ2eMLuYMhk="; 21 22 nativeInstallCheckInputs = [ versionCheckHook ]; 23 doInstallCheck = true; 24 25 # requires unstable rust features 26 env.RUSTC_BOOTSTRAP = 1; 27 28 passthru.updateScript = nix-update-script { }; 29 30 meta = { 31 description = "Fast type checker and IDE for Python"; 32 homepage = "https://github.com/facebook/pyrefly"; 33 license = lib.licenses.mit; 34 mainProgram = "pyrefly"; 35 platforms = lib.platforms.linux ++ lib.platforms.darwin; 36 maintainers = with lib.maintainers; [ 37 cybardev 38 QuiNzX 39 ]; 40 }; 41})