xorg: allow and check abiCompat on current version

This commit is contained in:
David McFarland 2018-01-09 21:20:33 -04:00
parent 68dda232d2
commit ebf1dade82

View File

@ -429,8 +429,9 @@ in
xorgserver = with xorg; attrs_passed:
# exchange attrs if abiCompat is set
let
version = (builtins.parseDrvName attrs_passed.name).version;
attrs = with args;
if (args.abiCompat == null) then attrs_passed
if (args.abiCompat == null || lib.hasPrefix args.abiCompat version) then attrs_passed
else if (args.abiCompat == "1.17") then {
name = "xorg-server-1.17.4";
builder = ./builder.sh;
@ -452,7 +453,7 @@ in
buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
postPatch = "sed '1i#include <malloc.h>' -i include/os.h";
meta.platforms = stdenv.lib.platforms.unix;
} else throw "unsupported xorg abiCompat: ${args.abiCompat}";
} else throw "unsupported xorg abiCompat ${args.abiCompat} for ${attrs_passed.name}";
in attrs //
(let