Skip to content

Commit 771398e

Browse files
committed
autoAddDriverRunpathHook: init
1 parent 659a67f commit 771398e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# shellcheck shell=bash
2+
# Run addDriverRunpath on all dynamically linked, ELF files
3+
echo "Sourcing auto-add-driver-runpath-hook"
4+
5+
if [ -n "${dontUseAutoAddOpenGLRunpath-}" ]; then
6+
echo "dontUseAutoAddOpenGLRunpath has been deprecated, please use dontUseAutoAddDriverRunpath instead"
7+
fi
8+
9+
# Respect old toggle value to allow for people to gracefully transition
10+
# See: https://github.com/NixOS/nixpkgs/issues/141803 for transition roadmap
11+
if [ -z "${dontUseAutoAddDriverRunpath-}" -a -z "${dontUseAutoAddOpenGLRunpath-}" ]; then
12+
echo "Using autoAddDriverRunpath"
13+
postFixupHooks+=("autoFixElfFiles addDriverRunpath")
14+
fi
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{ addDriverRunpath, autoFixElfFiles, makeSetupHook }:
2+
3+
makeSetupHook {
4+
name = "auto-add-driver-runpath-hook";
5+
propagatedBuildInputs = [ addDriverRunpath autoFixElfFiles ];
6+
} ./auto-add-driver-runpath-hook.sh

0 commit comments

Comments
 (0)