git.iko.soy/typeable/nixpkgs
on master help sign in
xorg-server: fglrxCompat -> abiCompat

Allows it to be used for fglrx (1.17) and amdgpu-pro (1.18)

commit905627c7c5d25f6006ff3d757e8800958fc00e14 authorDavid McFarland <corngood@gmail.com> dateSun 29 Jan 2017, 19:02 (10 years ago) parent47c166f
4 files changed+18−6
nixos/modules/hardware/video/amdgpu-pro.nix+2 nixos/modules/hardware/video/ati.nix+1−1 pkgs/servers/x11/xorg/overrides.nix+14−4 pkgs/top-level/all-packages.nix+1−1
nixos/modules/hardware/video/amdgpu-pro.nix+2
@@ -21,6 +21,8 @@ in
2121
2222 config = mkIf enabled {
2323
24+ nixpkgs.config.xorg.abiCompat = "1.18";
25+
2426 services.xserver.drivers = singleton
2527 { name = "amdgpu"; modules = [ package ]; libPath = [ package ]; };
2628
nixos/modules/hardware/video/ati.nix+1−1
@@ -18,7 +18,7 @@ in
1818
1919 config = mkIf enabled {
2020
21− nixpkgs.config.xorg.fglrxCompat = true;
21+ nixpkgs.config.xorg.abiCompat = "1.17";
2222
2323 services.xserver.drivers = singleton
2424 { name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; };
pkgs/servers/x11/xorg/overrides.nix+14−4
@@ -393,10 +393,11 @@ in
393393 };
394394
395395 xorgserver = with xorg; attrs_passed:
396− # exchange attrs if fglrxCompat is set
396+ # exchange attrs if abiCompat is set
397397 let
398− attrs = if !args.fglrxCompat then attrs_passed else
399− with args; {
398+ attrs = with args;
399+ if (args.abiCompat == null) then attrs_passed
400+ else if (args.abiCompat == "1.17") then {
400401 name = "xorg-server-1.17.4";
401402 builder = ./builder.sh;
402403 src = fetchurl {
@@ -405,7 +406,16 @@ in
405406 };
406407 buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
407408 meta.platforms = stdenv.lib.platforms.unix;
408− };
409+ } else if (args.abiCompat == "1.18") then {
410+ name = "xorg-server-1.18.4";
411+ builder = ./builder.sh;
412+ src = fetchurl {
413+ url = mirror://xorg/individual/xserver/xorg-server-1.18.4.tar.bz2;
414+ sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117";
415+ };
416+ buildInputs = [pkgconfig dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
417+ meta.platforms = stdenv.lib.platforms.unix;
418+ } else throw "unsupported xorg abiCompat: ${args.abiCompat}";
409419
410420 in attrs //
411421 (let
pkgs/top-level/all-packages.nix+1−1
@@ -10769,7 +10769,7 @@ with pkgs;
1076910769 python = python2; # Incompatible with Python 3x
1077010770 udev = if stdenv.isLinux then udev else null;
1077110771 libdrm = if stdenv.isLinux then libdrm else null;
10772− fglrxCompat = config.xorg.fglrxCompat or false; # `config` because we have no `xorg.override`
10772+ abiCompat = config.xorg.abiCompat or null; # `config` because we have no `xorg.override`
1077310773 } // { inherit xlibsWrapper; } );
1077410774
1077510775 xwayland = callPackage ../servers/x11/xorg/xwayland.nix { };