Commit Graph

5 Commits

Author SHA1 Message Date
Connor Baker
7a66dcf83f cuda-modules: use stdenv instead of backendStdenv for *Platform access 2024-04-18 16:31:18 +00:00
Connor Baker
14635b4092 cuda-modules: don't use *Platform attributes from pkgs
For more information about *why* this is desirable, see
https://github.com/NixOS/nixpkgs/pull/45717
and
https://github.com/NixOS/nixpkgs/issues/27069
2024-04-10 14:14:00 +00:00
Connor Baker
93b08a7061 {pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
```bash
nix run github:NixOS/nixpkgs/ab6071eb54cc9b66dda436111d4f569e4e56cbf4#nixfmt-rfc-style -L --allow-import-from-derivation -- pkgs/development/cuda-modules pkgs/test/cuda pkgs/top-level/cuda-packages.nix
```
2024-04-01 01:14:28 +00:00
Yann Hamdaoui
63746cac08
cudaPackages: generalize and refactor setup hook
This PR refactor CUDA setup hooks, and in particular
autoAddOpenGLRunpath and autoAddCudaCompatRunpathHook, that were using a
lot of code in common (in fact, I introduced the latter by copy pasting
most of the bash script of the former). This is not satisfying for
maintenance, as a recent patch showed, because we need to duplicate
changes to both hooks.

This commit abstract the common part in a single shell script that
applies a generic patch action to every elf file in the output. For
autoAddOpenGLRunpath the action is just addOpenGLRunpath (now
addDriverRunpath), and is few line function for
autoAddCudaCompatRunpathHook.

Doing so, we also takes the occasion to use the newer addDriverRunpath
instead of the previous addOpenGLRunpath, and rename the CUDA hook to
reflect that as well.

Co-Authored-By: Connor Baker <connor.baker@tweag.io>
2024-03-15 15:54:21 +01:00
Someone Serge
875e43dfd7
cudaPackages.cuda{,-library}-samples: move to cuda-modules/
cudaPackages are part of the package set and should not depend on pkgs/test
2024-01-12 20:24:50 +00:00