From ec91406453369ab86d8feffdb2ed08b28691ef35 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 18 Jan 2025 11:02:42 +0900 Subject: [PATCH 1/2] ruff: fix tests on darwin --- pkgs/by-name/ru/ruff/package.nix | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/ru/ruff/package.nix b/pkgs/by-name/ru/ruff/package.nix index aa97ab3e2553..353c57b25c4c 100644 --- a/pkgs/by-name/ru/ruff/package.nix +++ b/pkgs/by-name/ru/ruff/package.nix @@ -56,32 +56,12 @@ rustPlatform.buildRustPackage rec { cargoCheckHook ''; - # Failing on darwin for an unclear reason. + # Failing on darwin for an unclear reason, but probably due to sandbox. # According to the maintainers, those tests are from an experimental crate that isn't actually # used by ruff currently and can thus be safely skipped. - checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [ - "--skip=added_package" - "--skip=add_search_path" - "--skip=changed_file" - "--skip=changed_versions_file" - "--skip=deleted_file" - "--skip=directory_deleted" - "--skip=directory_moved_to_trash" - "--skip=directory_moved_to_workspace" - "--skip=directory_renamed" - "--skip=hard_links_in_workspace" - "--skip=hard_links_to_target_outside_workspace" - "--skip=move_file_to_trash" - "--skip=move_file_to_workspace" - "--skip=nested_packages_delete_root" - "--skip=new_file" - "--skip=new_ignored_file" - "--skip=removed_package" - "--skip=rename_file" - "--skip=search_path" - "--skip=unix::changed_metadata" - "--skip=unix::symlinked_module_search_path" - "--skip=unix::symlink_inside_workspace" + cargoTestFlags = lib.optionals stdenv.hostPlatform.isDarwin [ + "--workspace" + "--exclude=red_knot" ]; nativeInstallCheckInputs = [ From c626b2b34ce8ecd364b695c8d7ac14d26df1c64d Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 19 Jan 2025 11:55:01 +0900 Subject: [PATCH 2/2] ruff: remove duplicate cargoCheckHook --- pkgs/by-name/ru/ruff/package.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/by-name/ru/ruff/package.nix b/pkgs/by-name/ru/ruff/package.nix index 353c57b25c4c..1873cc36cf02 100644 --- a/pkgs/by-name/ru/ruff/package.nix +++ b/pkgs/by-name/ru/ruff/package.nix @@ -52,9 +52,7 @@ rustPlatform.buildRustPackage rec { # tests do not appear to respect linker options on doctests # Upstream issue: https://github.com/rust-lang/cargo/issues/14189 # This causes errors like "error: linker `cc` not found" on static builds - postInstallCheck = lib.optionalString (!stdenv.hostPlatform.isStatic) '' - cargoCheckHook - ''; + doCheck = !stdenv.hostPlatform.isStatic; # Failing on darwin for an unclear reason, but probably due to sandbox. # According to the maintainers, those tests are from an experimental crate that isn't actually