nixpkgs/pkgs/development/cuda-modules/saxpy/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

62 lines
1.4 KiB
Nix

{
autoAddDriverRunpath,
cmake,
cudaPackages,
lib,
}:
let
inherit (cudaPackages)
backendStdenv
cuda_cccl
cuda_cudart
cuda_nvcc
cudaAtLeast
cudaOlder
cudatoolkit
flags
libcublas
setupCudaHook
;
inherit (lib) getDev getLib getOutput;
in
backendStdenv.mkDerivation {
pname = "saxpy";
version = "unstable-2023-07-11";
src = ./.;
__structuredAttrs = true;
strictDeps = true;
nativeBuildInputs =
[
cmake
autoAddDriverRunpath
]
++ lib.optionals (cudaOlder "11.4") [ cudatoolkit ]
++ lib.optionals (cudaAtLeast "11.4") [ cuda_nvcc ];
buildInputs =
lib.optionals (cudaOlder "11.4") [ cudatoolkit ]
++ lib.optionals (cudaAtLeast "11.4") [
(getDev libcublas)
(getLib libcublas)
(getOutput "static" libcublas)
cuda_cudart
]
++ lib.optionals (cudaAtLeast "12.0") [ cuda_cccl ];
cmakeFlagsArray = [
(lib.cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" flags.cmakeCudaArchitecturesString)
];
meta = rec {
description = "Simple (Single-precision AX Plus Y) FindCUDAToolkit.cmake example for testing cross-compilation";
license = lib.licenses.mit;
maintainers = lib.teams.cuda.members;
platforms = lib.platforms.unix;
badPlatforms = lib.optionals (flags.isJetsonBuild && cudaOlder "11.4") platforms;
};
}