From 47f579c20155faa9eb4182f407d3a2b66f43c71d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 27 Dec 2025 18:23:26 +0000 Subject: [PATCH] python3Packages.outlines: fix cuda build by disabling pythonImportsCheck and tests --- pkgs/development/python-modules/outlines/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/outlines/default.nix b/pkgs/development/python-modules/outlines/default.nix index 59c56755ce5c..eed4b70dc26d 100644 --- a/pkgs/development/python-modules/outlines/default.nix +++ b/pkgs/development/python-modules/outlines/default.nix @@ -1,5 +1,6 @@ { lib, + config, buildPythonPackage, fetchFromGitHub, @@ -75,7 +76,13 @@ buildPythonPackage rec { transformers ]; - pythonImportsCheck = [ "outlines" ]; + # llama_cpp dependency cannot be imported when cudaSupport is enabled as it tries to load libcuda.so.1. + # This library is provided by the nvidia driver at runtime, but isn't available in the sandbox. + pythonImportsCheck = lib.optionals (!config.cudaSupport) [ + "outlines" + ]; + # We also have to give up on tests for the same reason. + doCheck = !config.cudaSupport; nativeCheckInputs = [ airportsdata