From 2414fefb794f861708d303d84aee72b2dd7300af Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 20 Jun 2025 10:57:28 +0100 Subject: [PATCH] python3Packages.chromadb: improve doCheck condition On aarch64-linux onnxruntime cannot be imported, as it attempts to read /sys/devices/system/cpu, which does not exist in the sandbox. As onnxruntime cannot be imported, chromadb cannot be tested. However, this issue only applies in the build sandbox, not at runtime. Therefore the package doesn't need to be marked broken. Updated the condition to check `buildPlatform` instead of `hostPlatform`, as the issue relates to the build sandbox and is not a runtime issue. Use `isAarch` and `isLinux` attributes instead of doing string comparison. --- See https://github.com/NixOS/nixpkgs/pull/412528#discussion_r2129396116 And upstream onnxruntime issue: https://github.com/microsoft/onnxruntime/issues/10038 --- pkgs/development/python-modules/chromadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/chromadb/default.nix b/pkgs/development/python-modules/chromadb/default.nix index 868cd5a7ca42..af829cbb5c1a 100644 --- a/pkgs/development/python-modules/chromadb/default.nix +++ b/pkgs/development/python-modules/chromadb/default.nix @@ -171,10 +171,10 @@ buildPythonPackage rec { # Disable on aarch64-linux due to broken onnxruntime # https://github.com/microsoft/onnxruntime/issues/10038 - pythonImportsCheck = lib.optionals (stdenv.hostPlatform.system != "aarch64-linux") [ "chromadb" ]; + pythonImportsCheck = lib.optionals doCheck [ "chromadb" ]; # Test collection breaks on aarch64-linux - doCheck = stdenv.hostPlatform.system != "aarch64-linux"; + doCheck = with stdenv.buildPlatform; !(isAarch && isLinux); env = { ZSTD_SYS_USE_PKG_CONFIG = true;