nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildRedist,
3 cudaAtLeast,
4 lib,
5}:
6buildRedist {
7 redistName = "cuda";
8 pname = "cuda_cccl";
9
10 # Restrict header-only packages to a single output.
11 # Also, when using multiple outputs (i.e., `out`, `dev`, and `include`), something isn't being patched correctly,
12 # so libnvshmem fails to build, complaining about being unable to find the thrust include directory. This is likely
13 # because the `dev` output contains the CMake configuration and is written to assume it will share a parent
14 # directory with the include directory rather than be in a separate output.
15 outputs = [ "out" ];
16
17 prePatch = lib.optionalString (cudaAtLeast "13.0") ''
18 nixLog "removing top-level $PWD/include/nv directory"
19 rm -rfv "$PWD/include/nv"
20 nixLog "un-nesting top-level $PWD/include/cccl directory"
21 mv -v "$PWD/include/cccl"/* "$PWD/include/"
22 nixLog "removing empty $PWD/include/cccl directory"
23 rmdir -v "$PWD/include/cccl"
24 '';
25
26 meta = {
27 description = "Building blocks that make it easier to write safe and efficient CUDA C++ code";
28 longDescription = ''
29 The goal of CCCL is to provide CUDA C++ developers with building blocks that make it easier to write safe and
30 efficient code.
31 '';
32 homepage = "https://github.com/NVIDIA/cccl";
33 changelog = "https://github.com/NVIDIA/cccl/releases";
34 };
35}