diff --git a/pkgs/by-name/im/immich-machine-learning/package.nix b/pkgs/by-name/im/immich-machine-learning/package.nix index e9f74898a776a..1ca2fa06ed365 100644 --- a/pkgs/by-name/im/immich-machine-learning/package.nix +++ b/pkgs/by-name/im/immich-machine-learning/package.nix @@ -4,6 +4,7 @@ immich, python3, nixosTests, + stdenv, }: let python = python3.override { @@ -58,6 +59,10 @@ python.pkgs.buildPythonApplication rec { ] ++ uvicorn.optional-dependencies.standard; + # aarch64-linux tries to get cpu information from /sys, which isn't available + # inside the nix build sandbox. + doCheck = stdenv.buildPlatform.system != "aarch64-linux"; + nativeCheckInputs = with python.pkgs; [ httpx pytest-asyncio diff --git a/pkgs/development/python-modules/insightface/default.nix b/pkgs/development/python-modules/insightface/default.nix index 4b4787d0a4187..534149a1dd977 100644 --- a/pkgs/development/python-modules/insightface/default.nix +++ b/pkgs/development/python-modules/insightface/default.nix @@ -58,20 +58,26 @@ buildPythonPackage rec { tqdm ]; + # aarch64-linux tries to get cpu information from /sys, which isn't available + # inside the nix build sandbox. + dontUsePythonImportsCheck = stdenv.buildPlatform.system == "aarch64-linux"; + + passthru.tests = lib.optionalAttrs (stdenv.buildPlatform.system != "aarch64-linux") { + version = testers.testVersion { + package = insightface; + command = "insightface-cli --help"; + # Doesn't support --version but we still want to make sure the cli is executable + # and returns the help output + version = "help"; + }; + }; + pythonImportsCheck = [ "insightface" "insightface.app" "insightface.data" ]; - passthru.tests.version = testers.testVersion { - package = insightface; - command = "insightface-cli --help"; - # Doesn't support --version but we still want to make sure the cli is executable - # and returns the help output - version = "help"; - }; - doCheck = false; # Upstream has no tests meta = { @@ -80,7 +86,5 @@ buildPythonPackage rec { homepage = "https://github.com/deepinsight/insightface"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ oddlama ]; - # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' - broken = stdenv.system == "aarch64-linux"; }; }