addOpenGLRunpath: Add new hook for setting RUNPATH.
This hook allows to add NixOS driver libraries path to given ELF objects' RUNPATH. We use it instead of settings RUNPATH manually everywhere. It must be invoked in postFixup so that RUNPATH stripping does not remove the path. It puts the path first instead of last so that system-wide drivers are always preferred.
This commit is contained in:
committed by
Ambroz Bizjak
parent
bae81580a2
commit
2874e849d9
@@ -0,0 +1,12 @@
|
||||
{ lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "add-opengl-runpath";
|
||||
|
||||
driverLink = "/run/opengl-driver" + lib.optionalString stdenv.isi686 "-32";
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/nix-support
|
||||
substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user