mesa: use grsec at build time, override at run time
This is needed for grsecurity kernels to be able to build stuff (e.g. pango). With grsec the libGL is slower, but we don't care much at build time, so we can share binaries among grsec and nogrsec. This adds 2-3 MB to nogrsec closures that use mesa drivers (libGL is doubled).
This commit is contained in:
parent
9b673d713d
commit
a5b29a63f6
|
@ -5482,13 +5482,17 @@ let
|
|||
mesaSupported = lib.elem system lib.platforms.mesaPlatforms;
|
||||
|
||||
mesa_original = callPackage ../development/libraries/mesa {
|
||||
grsecEnabled = config.grsecurity or false;
|
||||
# makes it slower, but during runtime we link against just mesa_drivers
|
||||
# through /run/opengl-driver*, which is overriden according to config.grsecurity
|
||||
grsecEnabled = true;
|
||||
};
|
||||
|
||||
mesa_noglu = if stdenv.isDarwin
|
||||
then darwinX11AndOpenGL // { driverLink = mesa_noglu; }
|
||||
else mesa_original;
|
||||
mesa_drivers = mesa_original.drivers;
|
||||
mesa_drivers = let
|
||||
mo = mesa_original.override { grsecEnabled = config.grsecurity or false; };
|
||||
in mo.drivers;
|
||||
mesa_glu = callPackage ../development/libraries/mesa-glu { };
|
||||
mesa = if stdenv.isDarwin then darwinX11AndOpenGL
|
||||
else buildEnv {
|
||||
|
|
Loading…
Reference in New Issue
Block a user