depot/third_party/nixpkgs/pkgs/development/cuda-modules/setup-hooks/mark-for-cudatoolkit-root-hook.sh
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

14 lines
451 B
Bash

# shellcheck shell=bash
# Should we mimick cc-wrapper's "hygiene"?
[[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
echo "Sourcing mark-for-cudatoolkit-root-hook" >&2
markForCUDAToolkit_ROOT() {
mkdir -p "${prefix}/nix-support"
[[ -f "${prefix}/nix-support/include-in-cudatoolkit-root" ]] && return
echo "$pname-$output" > "${prefix}/nix-support/include-in-cudatoolkit-root"
}
fixupOutputHooks+=(markForCUDAToolkit_ROOT)