From 5394f263ce2f8b364d21eae10c9d08475d3011f0 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Fri, 29 Nov 2024 23:57:45 -0800 Subject: [PATCH] pkgsStatic.ruff: ignore tests doctests do not appear to respect the linker option set in `.cargo/config.toml`. Until this gets fixed, tests are disabled on static builds. error: ``` ---- crates/red_knot_python_semantic/src/module_name.rs - module_name::ModuleName::parent (line 84) stdout ---- error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to 1 previous error Couldn't compile the test. ``` --- pkgs/by-name/ru/ruff/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ru/ruff/package.nix b/pkgs/by-name/ru/ruff/package.nix index ea326706b008..6fd163a518cd 100644 --- a/pkgs/by-name/ru/ruff/package.nix +++ b/pkgs/by-name/ru/ruff/package.nix @@ -71,7 +71,10 @@ python3Packages.buildPythonPackage rec { # Run cargo tests cargoCheckType = "debug"; - postInstallCheck = '' + # 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 '';