xorg-server: fglrxCompat -> abiCompat

Allows it to be used for fglrx (1.17) and amdgpu-pro (1.18)
This commit is contained in:
David McFarland 2017-01-29 19:02:48 -04:00
parent 47c166fe05
commit 905627c7c5
4 changed files with 18 additions and 6 deletions

View File

@ -21,6 +21,8 @@ in
config = mkIf enabled {
nixpkgs.config.xorg.abiCompat = "1.18";
services.xserver.drivers = singleton
{ name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };

View File

@ -18,7 +18,7 @@ in
config = mkIf enabled {
nixpkgs.config.xorg.fglrxCompat = true;
nixpkgs.config.xorg.abiCompat = "1.17";
services.xserver.drivers = singleton
{ name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; };

View File

@ -393,10 +393,11 @@ in
};
xorgserver = with xorg; attrs_passed:
# exchange attrs if fglrxCompat is set
# exchange attrs if abiCompat is set
let
attrs = if !args.fglrxCompat then attrs_passed else
with args; {
attrs = with args;
if (args.abiCompat == null) then attrs_passed
else if (args.abiCompat == "1.17") then {
name = "xorg-server-1.17.4";
builder = ./builder.sh;
src = fetchurl {
@ -405,7 +406,16 @@ in
};
buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
meta.platforms = stdenv.lib.platforms.unix;
};
} else if (args.abiCompat == "1.18") then {
name = "xorg-server-1.18.4";
builder = ./builder.sh;
src = fetchurl {
url = mirror://xorg/individual/xserver/xorg-server-1.18.4.tar.bz2;
sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117";
};
buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
meta.platforms = stdenv.lib.platforms.unix;
} else throw "unsupported xorg abiCompat: ${args.abiCompat}";
in attrs //
(let

View File

@ -10769,7 +10769,7 @@ with pkgs;
python = python2; # Incompatible with Python 3x
udev = if stdenv.isLinux then udev else null;
libdrm = if stdenv.isLinux then libdrm else null;
fglrxCompat = config.xorg.fglrxCompat or false; # `config` because we have no `xorg.override`
abiCompat = config.xorg.abiCompat or null; # `config` because we have no `xorg.override`
} // { inherit xlibsWrapper; } );
xwayland = callPackage ../servers/x11/xorg/xwayland.nix { };