xorg: adjust overrides to xorgproto

This commit is contained in:
Lengyel Balazs 2018-12-31 02:37:38 +01:00 committed by Robin Gloster
parent c3db044b54
commit 51d6b1bdec

View File

@ -20,7 +20,7 @@ in
self: super: self: super:
{ {
bdftopcf = super.bdftopcf.overrideAttrs (attrs: { bdftopcf = super.bdftopcf.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ [ self.xproto self.fontsproto ]; buildInputs = attrs.buildInputs ++ [ self.xorgproto ];
}); });
bitmap = super.bitmap.overrideAttrs (attrs: { bitmap = super.bitmap.overrideAttrs (attrs: {
@ -103,6 +103,7 @@ self: super:
rm -rf $out/share/doc rm -rf $out/share/doc
''; '';
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -"; CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
propagatedBuildInputs = [ self.xorgproto ];
}); });
libAppleWM = super.libAppleWM.overrideAttrs (attrs: { libAppleWM = super.libAppleWM.overrideAttrs (attrs: {
@ -114,6 +115,7 @@ self: super:
libXau = super.libXau.overrideAttrs (attrs: { libXau = super.libXau.overrideAttrs (attrs: {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
propagatedBuildInputs = [ self.xorgproto ];
}); });
libXdmcp = super.libXdmcp.overrideAttrs (attrs: { libXdmcp = super.libXdmcp.overrideAttrs (attrs: {
@ -156,10 +158,6 @@ self: super:
configureFlags = [ "--disable-selective-werror" ]; configureFlags = [ "--disable-selective-werror" ];
}); });
compositeproto = super.compositeproto.overrideAttrs (attrs: {
propagatedBuildInputs = [ self.fixesproto ];
});
libICE = super.libICE.overrideAttrs (attrs: { libICE = super.libICE.overrideAttrs (attrs: {
outputs = [ "out" "dev" "doc" ]; outputs = [ "out" "dev" "doc" ];
}); });
@ -198,7 +196,7 @@ self: super:
libXext = super.libXext.overrideAttrs (attrs: { libXext = super.libXext.overrideAttrs (attrs: {
outputs = [ "out" "dev" "man" "doc" ]; outputs = [ "out" "dev" "man" "doc" ];
propagatedBuildInputs = [ self.xproto self.libXau ]; propagatedBuildInputs = [ self.xorgproto self.libXau ];
configureFlags = attrs.configureFlags or [] configureFlags = attrs.configureFlags or []
++ malloc0ReturnsNullCrossFlag; ++ malloc0ReturnsNullCrossFlag;
}); });
@ -239,7 +237,7 @@ self: super:
outputs = [ "out" "dev" "doc" ]; outputs = [ "out" "dev" "doc" ];
configureFlags = attrs.configureFlags or [] configureFlags = attrs.configureFlags or []
++ malloc0ReturnsNullCrossFlag; ++ malloc0ReturnsNullCrossFlag;
propagatedBuildInputs = [ self.renderproto ]; propagatedBuildInputs = [ self.xorgproto ];
}); });
libXres = super.libXres.overrideAttrs (attrs: { libXres = super.libXres.overrideAttrs (attrs: {
@ -256,7 +254,7 @@ self: super:
outputs = [ "out" "dev" "doc" ]; outputs = [ "out" "dev" "doc" ];
configureFlags = attrs.configureFlags or [] configureFlags = attrs.configureFlags or []
++ malloc0ReturnsNullCrossFlag; ++ malloc0ReturnsNullCrossFlag;
buildInputs = attrs.buildInputs ++ [self.renderproto]; buildInputs = attrs.buildInputs ++ [self.xorgproto];
}); });
libXp = super.libXp.overrideAttrs (attrs: { libXp = super.libXp.overrideAttrs (attrs: {
@ -447,12 +445,23 @@ self: super:
meta = attrs.meta // { license = lib.licenses.mit; }; meta = attrs.meta // { license = lib.licenses.mit; };
}); });
xorgproto = super.xorgproto.overrideAttrs (attrs: {
buildInputs = [];
});
xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed: xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed:
# exchange attrs if abiCompat is set # exchange attrs if abiCompat is set
let let
version = (builtins.parseDrvName attrs_passed.name).version; version = (builtins.parseDrvName attrs_passed.name).version;
attrs = attrs =
if (abiCompat == null || lib.hasPrefix abiCompat version) then attrs_passed if (abiCompat == null || lib.hasPrefix abiCompat version) then
attrs_passed // {
buildInputs = attrs_passed.buildInputs ++ [ libdrm.dev ]; patchPhase = ''
for i in dri3/*.c
do
sed -i -e "s|#include <drm_fourcc.h>|#include <libdrm/drm_fourcc.h>|" $i
done
'';}
else if (abiCompat == "1.17") then { else if (abiCompat == "1.17") then {
name = "xorg-server-1.17.4"; name = "xorg-server-1.17.4";
builder = ./builder.sh; builder = ./builder.sh;
@ -461,7 +470,7 @@ self: super:
sha256 = "0mv4ilpqi5hpg182mzqn766frhi6rw48aba3xfbaj4m82v0lajqc"; sha256 = "0mv4ilpqi5hpg182mzqn766frhi6rw48aba3xfbaj4m82v0lajqc";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]; buildInputs = [ xorgproto 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; meta.platforms = stdenv.lib.platforms.unix;
} else if (abiCompat == "1.18") then { } else if (abiCompat == "1.18") then {
name = "xorg-server-1.18.4"; name = "xorg-server-1.18.4";
@ -471,7 +480,7 @@ self: super:
sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117"; sha256 = "1j1i3n5xy1wawhk95kxqdc54h34kg7xp4nnramba2q8xqfr5k117";
}; };
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ dri2proto dri3proto renderproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ] buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ]
++ stdenv.lib.optionals stdenv.isDarwin [ ++ stdenv.lib.optionals stdenv.isDarwin [
# Needed for NSDefaultRunLoopMode symbols. # Needed for NSDefaultRunLoopMode symbols.
cf-private cf-private
@ -486,14 +495,8 @@ self: super:
commonBuildInputs = attrs.buildInputs ++ [ xtrans ]; commonBuildInputs = attrs.buildInputs ++ [ xtrans ];
commonPropagatedBuildInputs = [ commonPropagatedBuildInputs = [
zlib libGL libGLU dbus zlib libGL libGLU dbus
xf86bigfontproto glproto xf86driproto xorgproto
compositeproto scrnsaverproto resourceproto libXext pixman libXfont libxshmfence libunwind
xf86dgaproto
dmxproto /*libdmx not used*/ xf86vidmodeproto
recordproto libXext pixman libXfont libxshmfence libunwind
damageproto xcmiscproto bigreqsproto
inputproto xextproto randrproto renderproto presentproto
dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto
libXfont2 libXfont2
]; ];
# XQuartz requires two compilations: the first to get X / XQuartz, # XQuartz requires two compilations: the first to get X / XQuartz,
@ -550,7 +553,7 @@ self: super:
Xplugin Carbon Cocoa Xplugin Carbon Cocoa
]; ];
propagatedBuildInputs = commonPropagatedBuildInputs ++ [ propagatedBuildInputs = commonPropagatedBuildInputs ++ [
libAppleWM applewmproto libAppleWM xorgproto
]; ];
# XQuartz patchset # XQuartz patchset
@ -635,7 +638,7 @@ self: super:
"--with-launchagents-dir=\${out}/LaunchAgents" "--with-launchagents-dir=\${out}/LaunchAgents"
]; ];
propagatedBuildInputs = [ self.xauth ] propagatedBuildInputs = [ self.xauth ]
++ lib.optionals isDarwin [ self.libX11 self.xproto ]; ++ lib.optionals isDarwin [ self.libX11 self.xorgproto ];
prePatch = '' prePatch = ''
sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
''; '';
@ -683,18 +686,6 @@ self: super:
buildInputs = with self; attrs.buildInputs ++ [libXt libxkbfile]; buildInputs = with self; attrs.buildInputs ++ [libXt libxkbfile];
}); });
kbproto = super.kbproto.overrideAttrs (attrs: {
outputs = [ "out" "doc" ];
});
xextproto = super.xextproto.overrideAttrs (attrs: {
outputs = [ "out" "doc" ];
});
xproto = super.xproto.overrideAttrs (attrs: {
outputs = [ "out" "doc" ];
});
xrdb = super.xrdb.overrideAttrs (attrs: { xrdb = super.xrdb.overrideAttrs (attrs: {
configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ]; configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ];
}); });