git.iko.soy/typeable/nixpkgs
on master help sign in
webkitgtk: Fix bubblewrap opengl-driver path

If `/run/opengl-driver/lib` is in `LD_LIBRARY_PATH`, bwrap will try to mount it into the already bind mounted `/run/opengl-driver`. To prevent this, we instead specify the subpaths of `/run/opengl-driver` we're interested in. Also, use the correct path for i686 builds.

commit5926b95fbe46f19447e0e4b53a24f71985bb5288 authortalyz <kim.lindberger@gmail.com> dateSun 9 May 2021, 14:10 (6 years ago) parent6358647
2 files changed+5−11
pkgs/development/libraries/webkitgtk/default.nix+2 pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch+3−11
pkgs/development/libraries/webkitgtk/default.nix+2
@@ -53,6 +53,7 @@
5353, xdg-dbus-proxy
5454, substituteAll
5555, glib
56+, addOpenGLRunpath
5657}:
5758
5859assert enableGeoLocation -> geoclue2 != null;
@@ -76,6 +77,7 @@ stdenv.mkDerivation rec {
7677 (substituteAll {
7778 src = ./fix-bubblewrap-paths.patch;
7879 inherit (builtins) storeDir;
80+ inherit (addOpenGLRunpath) driverLink;
7981 })
8082 ./libglvnd-headers.patch
8183 ];
pkgs/development/libraries/webkitgtk/fix-bubblewrap-paths.patch+3−11
@@ -1,16 +1,7 @@
11diff -ru old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp
22--- old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp 2019-09-09 04:47:07.000000000 -0400
33+++ webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp 2019-09-20 21:14:10.537921173 -0400
4−@@ -585,7 +585,7 @@
5− { SCMP_SYS(keyctl), nullptr },
6− { SCMP_SYS(request_key), nullptr },
7−
8−- // Scary VM/NUMA ops
9−+ // Scary VM/NUMA ops
10− { SCMP_SYS(move_pages), nullptr },
11− { SCMP_SYS(mbind), nullptr },
12− { SCMP_SYS(get_mempolicy), nullptr },
13−@@ -724,6 +724,11 @@
4+@@ -724,6 +724,12 @@
145 "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64",
156
167 "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR,
@@ -18,7 +9,8 @@ diff -ru old/webkitgtk-2.26.0/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLa
189+ // Nix Directories
1910+ "--ro-bind", "@storeDir@", "@storeDir@",
2011+ "--ro-bind", "/run/current-system", "/run/current-system",
21−+ "--ro-bind", "/run/opengl-driver", "/run/opengl-driver",
12++ "--ro-bind-try", "@driverLink@/lib", "@driverLink@/lib",
13++ "--ro-bind-try", "@driverLink@/share", "@driverLink@/share",
2214 };
2315 // We would have to parse ld config files for more info.
2416 bindPathVar(sandboxArgs, "LD_LIBRARY_PATH");