diff --git a/pkgs/development/python-modules/ale-py/default.nix b/pkgs/development/python-modules/ale-py/default.nix index ec10c5decc26..e10dd2713436 100644 --- a/pkgs/development/python-modules/ale-py/default.nix +++ b/pkgs/development/python-modules/ale-py/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, + config, buildPythonPackage, fetchFromGitHub, @@ -17,6 +18,9 @@ opencv, zlib, + # nativeBuildInputs + cudaPackages, + # dependencies numpy, @@ -49,6 +53,11 @@ buildPythonPackage (finalAttrs: { jax ]; + nativeBuildInputs = lib.optionals config.cudaSupport [ + # Required by opencv's cmake + cudaPackages.cuda_nvcc + ]; + # disable lto on darwin, cmake cannot find llvm-ar postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/ale/CMakeLists.txt \