nixpkgs/pkgs/development/cuda-modules/backend-stdenv.nix
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

27 lines
757 B
Nix

{
lib,
nvccCompatibilities,
cudaVersion,
pkgs,
overrideCC,
stdenv,
wrapCCWith,
stdenvAdapters,
}:
let
gccMajorVersion = nvccCompatibilities.${cudaVersion}.gccMaxMajorVersion;
cudaStdenv = stdenvAdapters.useLibsFrom stdenv pkgs."gcc${gccMajorVersion}Stdenv";
passthruExtra = {
# cudaPackages.backendStdenv.nixpkgsCompatibleLibstdcxx has been removed,
# if you need it you're likely doing something wrong. There has been a
# warning here for a month or so. Now we can no longer return any
# meaningful value in its place and drop the attribute entirely.
};
assertCondition = true;
in
# TODO: Consider testing whether we in fact use the newer libstdc++
lib.extendDerivation assertCondition passthruExtra cudaStdenv