Commit 56be5842 authored by Connor Baker's avatar Connor Baker
Browse files

cudaPackages: introduce and use lib.packagesFromDirectoryRecursive

parent 8e36f97b
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
# autoAddCudaCompatRunpath hook must be added AFTER `setupCudaHook`. Both
# hooks prepend a path with `libcuda.so` to the `DT_RUNPATH` section of
# patched elf files, but `cuda_compat` path must take precedence (otherwise,
# it doesn't have any effect) and thus appear first. Meaning this hook must be
# executed last.
{
  autoFixElfFiles,
  cuda_compat ? null,
  flags,
  lib,
  makeSetupHook,
}:
makeSetupHook {
  name = "auto-add-cuda-compat-runpath-hook";
  propagatedBuildInputs = [ autoFixElfFiles ];

  substitutions = {
    # Hotfix Ofborg evaluation
    libcudaPath = if flags.isJetsonBuild then "${cuda_compat}/compat" else null;
  };

  meta.broken = !flags.isJetsonBuild;

  # Pre-cuda_compat CUDA release:
  meta.badPlatforms = lib.optionals (cuda_compat == null) lib.platforms.all;
  meta.platforms = cuda_compat.meta.platforms or [ ];
} ./auto-add-cuda-compat-runpath.sh
+8 −0
Original line number Diff line number Diff line
# Exposed as cudaPackages.backendStdenv.
# This is what nvcc uses as a backend,
# and it has to be an officially supported one (e.g. gcc11 for cuda11).
#
# It, however, propagates current stdenv's libstdc++ to avoid "GLIBCXX_* not found errors"
# when linked with other C++ libraries.
# E.g. for cudaPackages_11_8 we use gcc11 with gcc12's libstdc++
# Cf. https://github.com/NixOS/nixpkgs/pull/218265 for context
{
  cudaVersion,
  lib,
+0 −0

File moved.

+0 −0

File moved.

Loading