From 303977634c10e495cdb4855ffe00fc02ac9801c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Sat, 1 May 2021 11:41:47 +0200 Subject: [PATCH] libtorch-bin: fix false CUDA dependency in passthru test The passthru test used the CUDA toolkit for the CUDA stub unconditionally, also requiring the cudatoolkit derivation when cudaSupport = false. --- .../libraries/science/math/libtorch/test/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/libtorch/test/default.nix b/pkgs/development/libraries/science/math/libtorch/test/default.nix index 60f9b5ad8846..eaea649d4340 100644 --- a/pkgs/development/libraries/science/math/libtorch/test/default.nix +++ b/pkgs/development/libraries/science/math/libtorch/test/default.nix @@ -42,8 +42,9 @@ in stdenv.mkDerivation { touch $out ''; - checkPhase = '' + checkPhase = lib.optionalString cudaSupport '' LD_LIBRARY_PATH=${cudaStub}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \ - ./test + '' + '' + ./test ''; }