diff --git a/pkgs/build-support/add-opengl-runpath/default.nix b/pkgs/build-support/add-opengl-runpath/default.nix deleted file mode 100644 index 5cab0937e074..000000000000 --- a/pkgs/build-support/add-opengl-runpath/default.nix +++ /dev/null @@ -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 - ''; -} diff --git a/pkgs/build-support/add-opengl-runpath/setup-hook.sh b/pkgs/build-support/add-opengl-runpath/setup-hook.sh deleted file mode 100644 index e556e7ead2a7..000000000000 --- a/pkgs/build-support/add-opengl-runpath/setup-hook.sh +++ /dev/null @@ -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 -} - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8a5e10e86faf..2cbf4cdae0d3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd60e1a1ab3c..49391a0f6d5d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };