From 96b9f4f77c283ee4c2fb3b5fe90cbb8ac6904f29 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 24 Mar 2026 10:32:14 -0700 Subject: [PATCH] python3Packages.argos-translate-files: skip pythonImportsCheck on aarch64 --- .../python-modules/argos-translate-files/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/argos-translate-files/default.nix b/pkgs/development/python-modules/argos-translate-files/default.nix index dc86edc06605..6003dd24a067 100644 --- a/pkgs/development/python-modules/argos-translate-files/default.nix +++ b/pkgs/development/python-modules/argos-translate-files/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, pytestCheckHook, @@ -11,6 +12,10 @@ translatehtml, }: +let + inherit (stdenv.hostPlatform) isLinux isAarch64; + isAarch64Linux = isLinux && isAarch64; +in buildPythonPackage (finalAttrs: { pname = "argos-translate-files"; version = "1.4.4"; @@ -43,15 +48,16 @@ buildPythonPackage (finalAttrs: { translatehtml ]; - doCheck = true; - nativeCheckInputs = [ pytestCheckHook # pythonImportsCheck needs a home dir for argostranslatefiles writableTmpDirAsHomeHook ]; - pythonImportsCheck = [ "argostranslatefiles" ]; + # 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) "argostranslatefiles"; + doCheck = !isAarch64Linux; meta = { description = "Translate files using Argos Translate";