diff options
Diffstat (limited to 'nixpkgs/pkgs/development/cuda-modules/cuda-library-samples/extension.nix')
-rw-r--r-- | nixpkgs/pkgs/development/cuda-modules/cuda-library-samples/extension.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/cuda-modules/cuda-library-samples/extension.nix b/nixpkgs/pkgs/development/cuda-modules/cuda-library-samples/extension.nix new file mode 100644 index 000000000000..4cb34af73209 --- /dev/null +++ b/nixpkgs/pkgs/development/cuda-modules/cuda-library-samples/extension.nix @@ -0,0 +1,14 @@ +{hostPlatform, lib}: +let + # Samples are built around the CUDA Toolkit, which is not available for + # aarch64. Check for both CUDA version and platform. + platformIsSupported = hostPlatform.isx86_64 && hostPlatform.isLinux; + + # Build our extension + extension = + final: _: + lib.attrsets.optionalAttrs platformIsSupported { + cuda-library-samples = final.callPackage ./generic.nix {}; + }; +in +extension |