mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
WARNING: history will change from now on (mesa updates)
Fix some paths set, drivers in mesa_drivers now, WIP.
This commit is contained in:
parent
da7d6a4cce
commit
0ad87ab46e
2 changed files with 11 additions and 11 deletions
|
@ -13,7 +13,7 @@ let
|
||||||
xserverWrapper = writeScript "xserver-wrapper"
|
xserverWrapper = writeScript "xserver-wrapper"
|
||||||
''
|
''
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
export XORG_DRI_DRIVER_PATH="${pkgs.mesa}/lib/dri"
|
#export XORG_DRI_DRIVER_PATH="${pkgs.mesa_drivers}/lib/dri" # ?? X sets this itself
|
||||||
export XKB_BINDIR="${pkgs.xorg.xkbcomp}/bin"
|
export XKB_BINDIR="${pkgs.xorg.xkbcomp}/bin"
|
||||||
exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
|
exec ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -393,6 +393,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable (checkAgent (checkPolkit {
|
config = mkIf cfg.enable (checkAgent (checkPolkit {
|
||||||
|
@ -461,9 +462,7 @@ in
|
||||||
environment =
|
environment =
|
||||||
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
|
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
|
||||||
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
|
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
|
||||||
} # !!! Depends on the driver selected at runtime.
|
XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
|
||||||
// optionalAttrs (!elem "nvidia" driverNames) {
|
|
||||||
XORG_DRI_DRIVER_PATH = "${pkgs.mesa}/lib/dri";
|
|
||||||
} // optionalAttrs (elem "nvidia" driverNames) {
|
} // optionalAttrs (elem "nvidia" driverNames) {
|
||||||
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11}/lib";
|
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11}/lib";
|
||||||
} // optionalAttrs (elem "nvidiaLegacy96" driverNames) {
|
} // optionalAttrs (elem "nvidiaLegacy96" driverNames) {
|
||||||
|
@ -474,18 +473,18 @@ in
|
||||||
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy304}/lib";
|
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.nvidia_x11_legacy304}/lib";
|
||||||
} // optionalAttrs (elem "ati_unfree" driverNames) {
|
} // optionalAttrs (elem "ati_unfree" driverNames) {
|
||||||
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.ati_drivers_x11}/lib:${kernelPackages.ati_drivers_x11}/X11R6/lib64/modules/linux";
|
LD_LIBRARY_PATH = "${xorg.libX11}/lib:${xorg.libXext}/lib:${kernelPackages.ati_drivers_x11}/lib:${kernelPackages.ati_drivers_x11}/X11R6/lib64/modules/linux";
|
||||||
XORG_DRI_DRIVER_PATH = "${kernelPackages.ati_drivers_x11}/lib/dri"; # is ignored because ati drivers ship their own unpatched libglx.so !
|
#XORG_DRI_DRIVER_PATH = "${kernelPackages.ati_drivers_x11}/lib/dri"; # is ignored because ati drivers ship their own unpatched libglx.so !
|
||||||
} // cfg.displayManager.job.environment;
|
} // cfg.displayManager.job.environment;
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
rm -f /run/opengl-driver
|
rm -f /run/opengl-driver
|
||||||
rm -f /run/opengl-driver-32
|
ln -sf opengl-driver /run/opengl-driver-32
|
||||||
${# !!! The OpenGL driver depends on what's detected at runtime.
|
${# !!! The OpenGL driver depends on what's detected at runtime.
|
||||||
if elem "nvidia" driverNames then
|
if elem "nvidia" driverNames then
|
||||||
''
|
''
|
||||||
ln -sf ${kernelPackages.nvidia_x11} /run/opengl-driver
|
ln -sf ${kernelPackages.nvidia_x11} /run/opengl-driver
|
||||||
${optionalString (pkgs.stdenv.system == "x86_64-linux" && cfg.driSupport32Bit)
|
${optionalString cfg.driSupport32Bit
|
||||||
"ln -sf ${pkgs_i686.linuxPackages.nvidia_x11.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
|
"ln -sf ${pkgs_i686.linuxPackages.nvidia_x11.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
|
||||||
''
|
''
|
||||||
else if elem "nvidiaLegacy96" driverNames then
|
else if elem "nvidiaLegacy96" driverNames then
|
||||||
|
@ -495,16 +494,16 @@ in
|
||||||
else if elem "nvidiaLegacy304" driverNames then
|
else if elem "nvidiaLegacy304" driverNames then
|
||||||
''
|
''
|
||||||
ln -sf ${kernelPackages.nvidia_x11_legacy304} /run/opengl-driver
|
ln -sf ${kernelPackages.nvidia_x11_legacy304} /run/opengl-driver
|
||||||
${optionalString (pkgs.stdenv.system == "x86_64-linux" && cfg.driSupport32Bit)
|
${optionalString cfg.driSupport32Bit
|
||||||
"ln -sf ${pkgs_i686.linuxPackages.nvidia_x11_legacy304.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
|
"ln -sf ${pkgs_i686.linuxPackages.nvidia_x11_legacy304.override { libsOnly = true; kernelDev = null; } } /run/opengl-driver-32"}
|
||||||
''
|
''
|
||||||
else if elem "ati_unfree" driverNames then
|
else if elem "ati_unfree" driverNames then
|
||||||
"ln -sf ${kernelPackages.ati_drivers_x11} /run/opengl-driver"
|
"ln -sf ${kernelPackages.ati_drivers_x11} /run/opengl-driver"
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
${optionalString cfg.driSupport "ln -sf ${pkgs.mesa} /run/opengl-driver"}
|
${optionalString cfg.driSupport "ln -sf ${pkgs.mesa_drivers} /run/opengl-driver"}
|
||||||
${optionalString (pkgs.stdenv.system == "x86_64-linux" && cfg.driSupport32Bit)
|
${optionalString cfg.driSupport32Bit
|
||||||
"ln -sf ${pkgs_i686.mesa} /run/opengl-driver-32"}
|
"ln -sf ${pkgs_i686.mesa_drivers} /run/opengl-driver-32"}
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,3 +624,4 @@ in
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue