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.
This commit is contained in:
Daniël de Kok 2021-05-01 11:41:47 +02:00 committed by Jonathan Ringer
parent 039101ad94
commit 303977634c

View File

@ -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
'';
}