diff options
-rw-r--r-- | nixos/modules/hardware/video/amdgpu-pro.nix | 2 | ||||
-rw-r--r-- | nixos/modules/hardware/video/ati.nix | 2 | ||||
-rw-r--r-- | pkgs/servers/x11/xorg/overrides.nix | 18 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 18 insertions, 6 deletions
diff --git a/nixos/modules/hardware/video/amdgpu-pro.nix b/nixos/modules/hardware/video/amdgpu-pro.nix index 979810abf90ad..9e81f1b48a22b 100644 --- a/nixos/modules/hardware/video/amdgpu-pro.nix +++ b/nixos/modules/hardware/video/amdgpu-pro.nix @@ -21,6 +21,8 @@ in config = mkIf enabled { + nixpkgs.config.xorg.abiCompat = "1.18"; + services.xserver.drivers = singleton { name = "amdgpu"; modules = [ package ]; libPath = [ package ]; }; diff --git a/nixos/modules/hardware/video/ati.nix b/nixos/modules/hardware/video/ati.nix index bf91bcf0776bb..022fdea0a0a3e 100644 --- a/nixos/modules/hardware/video/ati.nix +++ b/nixos/modules/hardware/video/ati.nix @@ -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" ]; }; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 889dd58c01bc4..9c4225c7e5e97 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e5576e0f82eba..ff3dfaf5a7d8c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |