@@ -353,10 +353,14 @@ func (d *DerivationBuilder) findCUDA(ctx context.Context, out *packageFS) error
353
353
slog .DebugContext (ctx , "added DT_NEEDED entry for system CUDA library" , "path" , need )
354
354
}
355
355
356
- slog .DebugContext (ctx , "looking for nix CUDA libraries in $patchDependencies" )
356
+ slog .DebugContext (ctx , "looking for nix libraries in $patchDependencies" )
357
357
deps := os .Getenv ("patchDependencies" )
358
+ if strings .TrimSpace (deps ) == "" {
359
+ slog .DebugContext (ctx , "$patchDependencies is empty" )
360
+ return nil
361
+ }
358
362
for _ , pkg := range strings .Split (deps , " " ) {
359
- slog .DebugContext (ctx , "checking for nix CUDA libraries in package" , "pkg" , pkg )
363
+ slog .DebugContext (ctx , "checking for nix libraries in package" , "pkg" , pkg )
360
364
361
365
pkgFS := newPackageFS (pkg )
362
366
libs , err := fs .Glob (pkgFS , "lib*/*.so*" )
@@ -375,7 +379,7 @@ func (d *DerivationBuilder) findCUDA(ctx context.Context, out *packageFS) error
375
379
}
376
380
d .glibcPatcher .needed = append (d .glibcPatcher .needed , need )
377
381
378
- slog .DebugContext (ctx , "added DT_NEEDED entry for nix CUDA library" , "path" , need )
382
+ slog .DebugContext (ctx , "added DT_NEEDED entry for nix library" , "path" , need )
379
383
}
380
384
}
381
385
return nil
0 commit comments