Running nixpkgs-update (https://github.com/NixOS/infra/blob/main/non-critical-infra/modules/nixpkgs-update/README.md) with UPDATE_INFO: ty 0.0.99 -> 0.0.108 https://github.com/astral-sh/ty/releases attrpath: ty Checking auto update branch... [version] [version] generic version rewriter does not support multiple hashes [rustCrateVersion] [rustCrateVersion] skipping because derivation has updateScript [golangModuleVersion] [golangModuleVersion] Not a buildGoModule package with vendorHash [npmDepsVersion] [npmDepsVersion] No npmDepsHash [updateScript] [updateScript] Success [updateScript] this derivation will be built: /nix/store/0xq7qy9hdqkgvk649n8w77p6b201vkxd-packages.json.drv building '/nix/store/0xq7qy9hdqkgvk649n8w77p6b201vkxd-packages.json.drv'... Going to be running update for following packages: - ty-0.0.99 Press Enter key to continue... Running update for: Enqueuing group of 1 packages - ty-0.0.99: UPDATING ... - ty-0.0.99: DONE. Packages updated! Diff after rewrites: diff --git a/pkgs/by-name/ty/ty/package.nix b/pkgs/by-name/ty/ty/package.nix index e6028b5cbf66..69a386e1e38f 100644 --- a/pkgs/by-name/ty/ty/package.nix +++ b/pkgs/by-name/ty/ty/package.nix @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "ty"; - version = "0.0.99"; + version = "0.0.108"; __structuredAttrs = true; src = fetchFromGitHub { @@ -28,7 +28,7 @@ rustPlatform.buildRustPackage (finalAttrs: { repo = "ty"; tag = finalAttrs.version; fetchSubmodules = true; - hash = "sha256-Xfs82DP1AyAldmmwp5VMrwSXRMQwSfU6ZeWo12A5NEM="; + hash = "sha256-U+R61z9p+/eOX7lN5jBtgXtV7kOE08eYfJ21lG81Oao="; }; # For Darwin platforms, remove the integration test for file notifications, @@ -42,7 +42,7 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoBuildFlags = [ "--package=ty" ]; - cargoHash = "sha256-N+xOMGpz1NIS7ZX/YwmJLCeK3/LEhXPGdUN2bZ7ZFR0="; + cargoHash = "sha256-4cfP+KXu9jyJhdGHB+RZUue94bSUYOWnDlrpuRdez1U="; nativeBuildInputs = [ installShellFiles No auto update branch exists Old version 0.0.99" not present in staging derivation file with contents: { lib, stdenv, rustPlatform, fetchFromGitHub, # nativeBuildInputs installShellFiles, pkg-config, # buildInputs rust-jemalloc-sys, zstd, buildPackages, versionCheckHook, nix-update-script, nixosTests, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "ty"; version = "0.0.100"; __structuredAttrs = true; src = fetchFromGitHub { owner = "astral-sh"; repo = "ty"; tag = finalAttrs.version; fetchSubmodules = true; hash = "sha256-yluvKdY42utNPpF0is+t2CbR027i7DwiYc3uRnTzFF4="; }; # For Darwin platforms, remove the integration test for file notifications, # as these tests fail in its sandboxes. postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' rm ${finalAttrs.cargoRoot}/crates/ty/tests/file_watching.rs ''; cargoRoot = "ruff"; buildAndTestSubdir = finalAttrs.cargoRoot; cargoBuildFlags = [ "--package=ty" ]; cargoHash = "sha256-BMu3CWvArrBryIJAUlGOnp17b3lBPhkEwiWQ43g4exU="; nativeBuildInputs = [ installShellFiles pkg-config ]; buildInputs = [ rust-jemalloc-sys zstd ]; # `ty`'s tests use `insta-cmd`, which depends on the structure of the `target/` directory, # and also fails to find the environment variable `$CARGO_BIN_EXE_ty`, which leads to tests failing. # Instead, we specify the path ourselves and forgo the lookup. # As the patches occur solely in test code, they have no effect on the packaged `ty` binary itself. # # `stdenv.hostPlatform.rust.cargoShortTarget` is taken from `cargoSetupHook`'s `installPhase`, # which constructs a path as below to reference the built binary. preCheck = '' export CARGO_BIN_EXE_ty="$PWD"/target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/ty ''; cargoTestFlags = [ "--package=ty" # CLI tests; file-watching tests only on Linux platforms "--package=ty_python_semantic" # core type checking tests "--package=ty_test" # test framework tests ]; checkFlags = [ # Flaky: # called `Result::unwrap()` on an `Err` value: Os { code: 26, kind: ExecutableFileBusy, message: "Text file busy" } "--skip=python_environment::ty_environment_and_active_environment" "--skip=python_environment::ty_environment_and_discovered_venv" "--skip=python_environment::ty_environment_is_only_environment" "--skip=python_environment::ty_environment_is_system_not_virtual" "--skip=python_environment::ty_system_environment_and_local_venv" # flaky: unmatched assertion: revealed: Literal[1] "--skip=mdtest::generics/pep695/functions.md" # flaky: https://github.com/astral-sh/ty/issues/1540 # fails with: Indexed project files contains '/build/.tmpOzGFH2/project/bar/baz.py' which was not expected. "--skip=unix::symlink_inside_project" ]; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ( let emulator = stdenv.hostPlatform.emulator buildPackages; in '' installShellCompletion --cmd ty \ --bash <(${emulator} $out/bin/ty generate-shell-completion bash) \ --fish <(${emulator} $out/bin/ty generate-shell-completion fish) \ --nushell <(${emulator} $out/bin/ty generate-shell-completion nushell) \ --zsh <(${emulator} $out/bin/ty generate-shell-completion zsh) '' ); passthru = { updateScript = nix-update-script { }; # ensure that an update doesn't break the test-driver. tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { nixos-test-driver-busybox = nixosTests.nixos-test-driver.busybox; }; }; requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Extremely fast Python type checker and language server, written in Rust"; homepage = "https://github.com/astral-sh/ty"; changelog = "https://github.com/astral-sh/ty/blob/${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.mit; mainProgram = "ty"; maintainers = with lib.maintainers; [ bengsparks ddogfoodd figsoda GaetanLepage ]; }; })