python3Packages.cupy: fixup shouldUsePkg to check for broken-ness

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
Connor Baker
2025-10-22 13:14:49 -07:00
parent 7c69a31d57
commit 3c604b19ef
@@ -17,8 +17,7 @@
let
inherit (cudaPackages) cudnn;
shouldUsePkg =
pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
shouldUsePkg = lib.mapNullable (pkg: if pkg.meta.available or true then pkg else null);
# some packages are not available on all platforms
cuda_nvprof = shouldUsePkg (cudaPackages.nvprof or null);