···34343535<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
36363737+- `addDriverRunpath` has been added to facilitate the deprecation of the old `addOpenGLRunpath` setuphook. This change is motivated by the evolution of the setuphook to include all hardware acceleration.
3838+3739- Cinnamon has been updated to 6.0. Please beware that the [Wayland session](https://blog.linuxmint.com/?p=4591) is still experimental in this release.
38403941- Programs written in [Nim](https://nim-lang.org/) are built with libraries selected by lockfiles.
···5052 - New instances of Gitea using MySQL now ignore the `[database].CHARSET` config option and always use the `utf8mb4` charset, existing instances should migrate via the `gitea doctor convert` CLI command.
51535254- The `hardware.pulseaudio` module now sets permission of pulse user home directory to 755 when running in "systemWide" mode. It fixes [issue 114399](https://github.com/NixOS/nixpkgs/issues/114399).
5555+
+14
pkgs/build-support/add-driver-runpath/default.nix
···11+{ lib, stdenv }:
22+33+stdenv.mkDerivation {
44+ name = "add-driver-runpath";
55+66+ # Named "opengl-driver" for legacy reasons, but it is the path to
77+ # hardware drivers installed by NixOS
88+ driverLink = "/run/opengl-driver" + lib.optionalString stdenv.isi686 "-32";
99+1010+ buildCommand = ''
1111+ mkdir -p $out/nix-support
1212+ substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook
1313+ '';
1414+}
···11+# Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
22+# This is needed to not rely on LD_LIBRARY_PATH which does not work with setuid
33+# executables. Fixes https://github.com/NixOS/nixpkgs/issues/22760. It must be run
44+# in postFixup because RUNPATH stripping in fixup would undo it. Note that patchelf
55+# actually sets RUNPATH not RPATH, which applies only to dependencies of the binary
66+# it set on (including for dlopen), so the RUNPATH must indeed be set on these
77+# libraries and would not work if set only on executables.
88+addDriverRunpath() {
99+ local forceRpath=
1010+1111+ while [ $# -gt 0 ]; do
1212+ case "$1" in
1313+ --) shift; break;;
1414+ --force-rpath) shift; forceRpath=1;;
1515+ --*)
1616+ echo "addDriverRunpath: ERROR: Invalid command line" \
1717+ "argument: $1" >&2
1818+ return 1;;
1919+ *) break;;
2020+ esac
2121+ done
2222+2323+ for file in "$@"; do
2424+ if ! isELF "$file"; then continue; fi
2525+ local origRpath="$(patchelf --print-rpath "$file")"
2626+ patchelf --set-rpath "@driverLink@/lib:$origRpath" ${forceRpath:+--force-rpath} "$file"
2727+ done
2828+}
2929+
+6
pkgs/top-level/all-packages.nix
···226226227227 chkservice = callPackage ../tools/admin/chkservice { };
228228229229+ # addDriverRunpath is the preferred package name, as this enables
230230+ # many more scenarios than just opengl now.
231231+ addDriverRunpath = callPackage ../build-support/add-driver-runpath { };
232232+233233+ # addOpenGLRunpath should be added to aliases.nix after the 24.05 branch-off.
234234+ # Post 24.11 branch-off, this should throw an error in aliases.nix.
229235 addOpenGLRunpath = callPackage ../build-support/add-opengl-runpath { };
230236231237 quickemu = callPackage ../development/quickemu { };