diff options
Diffstat (limited to 'nixpkgs/pkgs/development/cuda-modules/setup-hooks/auto-add-opengl-runpath-hook.sh')
-rw-r--r-- | nixpkgs/pkgs/development/cuda-modules/setup-hooks/auto-add-opengl-runpath-hook.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/cuda-modules/setup-hooks/auto-add-opengl-runpath-hook.sh b/nixpkgs/pkgs/development/cuda-modules/setup-hooks/auto-add-opengl-runpath-hook.sh deleted file mode 100644 index a6eeef7c7699..000000000000 --- a/nixpkgs/pkgs/development/cuda-modules/setup-hooks/auto-add-opengl-runpath-hook.sh +++ /dev/null @@ -1,28 +0,0 @@ -# shellcheck shell=bash -# Run addOpenGLRunpath on all dynamically linked, ELF files -echo "Sourcing auto-add-opengl-runpath-hook" - -elfHasDynamicSection() { - patchelf --print-rpath "$1" >& /dev/null -} - -autoAddOpenGLRunpathPhase() ( - local outputPaths - mapfile -t outputPaths < <(for o in $(getAllOutputNames); do echo "${!o}"; done) - find "${outputPaths[@]}" -type f -print0 | while IFS= read -rd "" f; do - if isELF "$f"; then - # patchelf returns an error on statically linked ELF files - if elfHasDynamicSection "$f" ; then - echo "autoAddOpenGLRunpathHook: patching $f" - addOpenGLRunpath "$f" - elif (( "${NIX_DEBUG:-0}" >= 1 )) ; then - echo "autoAddOpenGLRunpathHook: skipping a statically-linked ELF file $f" - fi - fi - done -) - -if [ -z "${dontUseAutoAddOpenGLRunpath-}" ]; then - echo "Using autoAddOpenGLRunpathPhase" - postFixupHooks+=(autoAddOpenGLRunpathPhase) -fi |