mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
mesa: fix libGL searching for libudev
Close #2784, #2731. I don't have a clue if using our libudev is always correct on non-nixos, or if using /run/current-system/sw/lib/libudev would be better...
This commit is contained in:
parent
cfc457eda5
commit
e4dc3f8ae3
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, flex, bison, autoreconfHook
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll
|
||||
, python, libxml2Python, file, expat, makedepend
|
||||
, libdrm, xorg, wayland, udev, llvm, libffi
|
||||
, libvdpau, libelf
|
||||
@ -45,7 +45,11 @@ stdenv.mkDerivation {
|
||||
./glx_ro_text_segm.patch # fix for grsecurity/PaX
|
||||
# TODO: revive ./dricore-gallium.patch when it gets ported (from Ubuntu),
|
||||
# as it saved ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog
|
||||
];
|
||||
] ++ optional stdenv.isLinux
|
||||
(substituteAll {
|
||||
src = ./dlopen-absolute-paths.diff;
|
||||
inherit udev;
|
||||
});
|
||||
|
||||
# Change the search path for EGL drivers from $drivers/* to driverLink
|
||||
postPatch = ''
|
||||
|
13
pkgs/development/libraries/mesa/dlopen-absolute-paths.diff
Normal file
13
pkgs/development/libraries/mesa/dlopen-absolute-paths.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/loader/loader.c b/src/loader/loader.c
|
||||
index 666d015..4d7a9be 100644
|
||||
--- a/src/loader/loader.c
|
||||
+++ b/src/loader/loader.c
|
||||
@@ -101,7 +101,7 @@ static void *
|
||||
udev_dlopen_handle(void)
|
||||
{
|
||||
if (!udev_handle) {
|
||||
- udev_handle = dlopen("libudev.so.1", RTLD_LOCAL | RTLD_LAZY);
|
||||
+ udev_handle = dlopen("@udev@/lib/libudev.so.1", RTLD_LOCAL | RTLD_LAZY);
|
||||
|
||||
if (!udev_handle) {
|
||||
/* libudev.so.1 changed the return types of the two unref functions
|
Loading…
Reference in New Issue
Block a user