mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 06:01:19 +00:00
addOpenGLRunpath: deprecate
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
06c0912a4f
commit
484dd2f92f
@ -1,12 +0,0 @@
|
||||
{ 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
|
||||
'';
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
# Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
|
||||
# This is needed to not rely on LD_LIBRARY_PATH which does not work with setuid
|
||||
# executables. Fixes https://github.com/NixOS/nixpkgs/issues/22760. It must be run
|
||||
# in postFixup because RUNPATH stripping in fixup would undo it. Note that patchelf
|
||||
# actually sets RUNPATH not RPATH, which applies only to dependencies of the binary
|
||||
# it set on (including for dlopen), so the RUNPATH must indeed be set on these
|
||||
# libraries and would not work if set only on executables.
|
||||
addOpenGLRunpath() {
|
||||
local forceRpath=
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--) shift; break;;
|
||||
--force-rpath) shift; forceRpath=1;;
|
||||
--*)
|
||||
echo "addOpenGLRunpath: ERROR: Invalid command line" \
|
||||
"argument: $1" >&2
|
||||
return 1;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file in "$@"; do
|
||||
if ! isELF "$file"; then continue; fi
|
||||
local origRpath="$(patchelf --print-rpath "$file")"
|
||||
patchelf --set-rpath "@driverLink@/lib:$origRpath" ${forceRpath:+--force-rpath} "$file"
|
||||
done
|
||||
}
|
||||
|
@ -69,6 +69,8 @@ mapAliases ({
|
||||
adtool = throw "'adtool' has been removed, as it was broken and unmaintained";
|
||||
adom = throw "'adom' has been removed, as it was broken and unmaintained"; # added 2024-05-09
|
||||
advcpmv = throw "'advcpmv' has been removed, as it is not being actively maintained and break recent coreutils."; # Added 2024-03-29
|
||||
# Post 24.11 branch-off, this should throw an error
|
||||
addOpenGLRunpath = addDriverRunpath; # Added 2024-05-25
|
||||
aether = throw "aether has been removed from nixpkgs; upstream unmaintained, security issues"; # Added 2023-10-03
|
||||
afl = throw "afl has been removed as the upstream project was archived. Consider using 'aflplusplus'"; # Added 2024-04-21
|
||||
airfield = throw "airfield has been removed due to being unmaintained"; # Added 2023-05-19
|
||||
|
@ -226,10 +226,6 @@ with pkgs;
|
||||
# many more scenarios than just opengl now.
|
||||
addDriverRunpath = callPackage ../build-support/add-driver-runpath { };
|
||||
|
||||
# addOpenGLRunpath should be added to aliases.nix after the 24.05 branch-off.
|
||||
# Post 24.11 branch-off, this should throw an error in aliases.nix.
|
||||
addOpenGLRunpath = callPackage ../build-support/add-opengl-runpath { };
|
||||
|
||||
quickgui = callPackage ../applications/virtualization/quickgui { };
|
||||
|
||||
adcli = callPackage ../os-specific/linux/adcli { };
|
||||
|
Loading…
Reference in New Issue
Block a user