From 38fd937d7569a832b3eae7e4a2f8d48c673d4d86 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 24 Mar 2026 10:30:02 -0700 Subject: [PATCH] python3Packages.translatehtml: skip pythonImportsCheck on aarch64 --- .../python-modules/translatehtml/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/translatehtml/default.nix b/pkgs/development/python-modules/translatehtml/default.nix index efb5d2fb93b1..87acf0ff9d99 100644 --- a/pkgs/development/python-modules/translatehtml/default.nix +++ b/pkgs/development/python-modules/translatehtml/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, writableTmpDirAsHomeHook, @@ -8,6 +9,10 @@ beautifulsoup4, }: +let + inherit (stdenv.hostPlatform) isLinux isAarch64; + isAarch64Linux = isLinux && isAarch64; +in buildPythonPackage (finalAttrs: { pname = "translatehtml"; version = "1.5.3"; @@ -29,8 +34,11 @@ buildPythonPackage (finalAttrs: { beautifulsoup4 ]; - pythonImportsCheck = [ "translatehtml" ]; + # aarch64-linux fails cpuinfo test, because /sys/devices/system/cpu/ does not exist in the sandbox: + # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' + pythonImportsCheck = lib.optional (!isAarch64Linux) "translatehtml"; nativeCheckInputs = [ writableTmpDirAsHomeHook ]; + doCheck = !isAarch64Linux; meta = { description = "Translate HTML using Beautiful Soup and Argos Translate";