summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirillrdy <kirillrdy@gmail.com>2026-01-17 22:56:06 +0000
committerGitHub <noreply@github.com>2026-01-17 22:56:06 +0000
commit77b9419d1ee36a71f67dffc48d5ed36602bdaf6a (patch)
tree6018add1469f9394746f87666f7dec2a0bd4f700
parent054a8dec8a1c8434de39ccb68ff087ef99021206 (diff)
parent4b971453b8cb6095b1e8c560c73ad4a4267fdd43 (diff)
python3Packages.onnxruntime: add pythonImportsCheckHook (#481039)
-rw-r--r--pkgs/development/python-modules/onnxruntime/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/onnxruntime/default.nix b/pkgs/development/python-modules/onnxruntime/default.nix
index 4d2ed826d456..9685d85a72a3 100644
--- a/pkgs/development/python-modules/onnxruntime/default.nix
+++ b/pkgs/development/python-modules/onnxruntime/default.nix
@@ -80,5 +80,16 @@ buildPythonPackage {
packaging
];
+ # 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'
+ #
+ # While this problem has existed for a while, it started occuring at import time since the update
+ # of onnxruntime to 1.23.1 (https://github.com/NixOS/nixpkgs/pull/450587)
+ pythonImportsCheck =
+ lib.optionals (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64))
+ [
+ "onnxruntime"
+ ];
+
meta = onnxruntime.meta;
}