2024-01-02 11:29:13 +00:00
|
|
|
{
|
2024-04-21 15:54:59 +00:00
|
|
|
cudaVersion,
|
2024-01-02 11:29:13 +00:00
|
|
|
lib,
|
|
|
|
nvccCompatibilities,
|
2024-01-25 14:12:00 +00:00
|
|
|
pkgs,
|
2024-01-02 11:29:13 +00:00
|
|
|
stdenv,
|
2024-01-25 14:12:00 +00:00
|
|
|
stdenvAdapters,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
let
|
|
|
|
gccMajorVersion = nvccCompatibilities.${cudaVersion}.gccMaxMajorVersion;
|
2024-01-25 14:12:00 +00:00
|
|
|
cudaStdenv = stdenvAdapters.useLibsFrom stdenv pkgs."gcc${gccMajorVersion}Stdenv";
|
2024-01-02 11:29:13 +00:00
|
|
|
passthruExtra = {
|
2024-01-25 14:12:00 +00:00
|
|
|
# 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.
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
assertCondition = true;
|
|
|
|
in
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# TODO: Consider testing whether we in fact use the newer libstdc++
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
lib.extendDerivation assertCondition passthruExtra cudaStdenv
|