2018-08-20 16:08:34 +01:00
|
|
|
{ abiCompat ? null,
|
2019-12-18 03:04:13 +00:00
|
|
|
stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
|
2019-06-16 20:59:06 +01:00
|
|
|
automake, autoconf, gettext, libiconv, libtool, intltool,
|
2018-10-03 15:08:34 +01:00
|
|
|
freetype, tradcpp, fontconfig, meson, ninja, ed,
|
2018-08-20 16:08:34 +01:00
|
|
|
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
|
2019-05-28 20:09:34 +01:00
|
|
|
mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook,
|
2019-12-14 15:46:17 +00:00
|
|
|
mcpp, epoxy, openssl, pkgconfig, llvm_6, python3,
|
2019-06-19 20:51:16 +01:00
|
|
|
ApplicationServices, Carbon, Cocoa, Xplugin
|
2018-11-06 18:00:03 +00:00
|
|
|
}:
|
2013-06-14 13:53:36 +01:00
|
|
|
|
2009-11-21 14:49:25 +00:00
|
|
|
let
|
2014-08-13 01:40:57 +01:00
|
|
|
inherit (stdenv) lib isDarwin;
|
|
|
|
inherit (lib) overrideDerivation;
|
|
|
|
|
2018-05-13 16:31:24 +01:00
|
|
|
malloc0ReturnsNullCrossFlag = stdenv.lib.optional
|
|
|
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
"--enable-malloc0returnsnull";
|
2009-11-21 14:49:25 +00:00
|
|
|
in
|
2018-10-18 16:51:13 +01:00
|
|
|
self: super:
|
2009-04-28 14:58:35 +01:00
|
|
|
{
|
2018-08-19 11:55:08 +01:00
|
|
|
bdftopcf = super.bdftopcf.overrideAttrs (attrs: {
|
2018-12-31 01:37:38 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ self.xorgproto ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2017-11-27 12:09:19 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
bitmap = super.bitmap.overrideAttrs (attrs: {
|
2017-11-29 04:29:43 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
|
|
paths=(
|
|
|
|
"$out/share/X11/%T/%N"
|
|
|
|
"$out/include/X11/%T/%N"
|
2018-08-19 11:55:08 +01:00
|
|
|
"${self.xbitmaps}/include/X11/%T/%N"
|
2017-11-29 04:29:43 +00:00
|
|
|
)
|
|
|
|
wrapProgram "$out/bin/bitmap" \
|
|
|
|
--suffix XFILESEARCHPATH : $(IFS=:; echo "''${paths[*]}")
|
|
|
|
makeWrapper "$out/bin/bitmap" "$out/bin/bitmap-color" \
|
|
|
|
--suffix XFILESEARCHPATH : "$out/share/X11/%T/%N-color"
|
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2017-11-29 04:29:43 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
encodings = super.encodings.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [ self.mkfontscale ];
|
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2019-03-07 22:01:46 +00:00
|
|
|
editres = super.editres.overrideAttrs (attrs: {
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
});
|
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
fontbhttf = super.fontbhttf.overrideAttrs (attrs: {
|
2016-08-29 21:32:58 +01:00
|
|
|
meta = attrs.meta // { license = lib.licenses.unfreeRedistributable; };
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-08-29 21:32:58 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
fontmiscmisc = super.fontmiscmisc.overrideAttrs (attrs: {
|
2009-04-28 14:58:35 +01:00
|
|
|
postInstall =
|
|
|
|
''
|
2018-08-19 11:55:08 +01:00
|
|
|
ALIASFILE=${self.fontalias}/share/fonts/X11/misc/fonts.alias
|
2009-11-06 15:16:47 +00:00
|
|
|
test -f $ALIASFILE
|
2017-12-01 10:37:03 +00:00
|
|
|
cp $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias
|
2009-10-02 19:03:23 +01:00
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
imake = super.imake.overrideAttrs (attrs: {
|
|
|
|
inherit (self) xorgcffiles;
|
2009-04-28 14:58:35 +01:00
|
|
|
x11BuildHook = ./imake.sh;
|
2015-08-21 00:12:27 +01:00
|
|
|
patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch];
|
2018-11-28 01:48:07 +00:00
|
|
|
setupHook = ./imake-setup-hook.sh;
|
2019-10-26 16:39:27 +01:00
|
|
|
CFLAGS = "-DIMAKE_COMPILETIME_CPP='\"${if stdenv.isDarwin
|
2018-08-20 16:08:34 +01:00
|
|
|
then "${tradcpp}/bin/cpp"
|
2019-10-26 16:39:27 +01:00
|
|
|
else "gcc"}\"'";
|
|
|
|
|
2018-11-28 01:48:07 +00:00
|
|
|
inherit tradcpp;
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2019-03-19 01:14:39 +00:00
|
|
|
mkfontdir = self.mkfontscale;
|
2009-11-21 10:11:44 +00:00
|
|
|
|
2019-12-14 16:52:41 +00:00
|
|
|
libxcb = (super.libxcb.override {
|
|
|
|
python = python3;
|
|
|
|
}).overrideAttrs (attrs: {
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--enable-xkb" "--enable-xinput" ];
|
2017-07-11 09:51:18 +01:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-21 10:44:22 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libX11 = super.libX11.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
2019-09-27 22:10:04 +01:00
|
|
|
patches = [
|
|
|
|
# Fixes an issue that happens when cross-compiling for us.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://cgit.freedesktop.org/xorg/lib/libX11/patch/?id=0327c427d62f671eced067c6d9b69f4e216a8cac";
|
|
|
|
sha256 = "11k2mx56hjgw886zf1cdf2nhv7052d5rggimfshg6lq20i38vpza";
|
|
|
|
})
|
|
|
|
];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-11-04 21:17:29 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2018-05-13 16:31:24 +01:00
|
|
|
preConfigure = ''
|
2014-08-22 00:40:14 +01:00
|
|
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
|
|
|
'';
|
2011-02-09 15:17:15 +00:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Remove useless DocBook XML files.
|
|
|
|
rm -rf $out/share/doc
|
|
|
|
'';
|
2014-08-17 21:17:13 +01:00
|
|
|
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
|
2018-12-31 01:37:38 +00:00
|
|
|
propagatedBuildInputs = [ self.xorgproto ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-21 14:49:25 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libAppleWM = super.libAppleWM.overrideAttrs (attrs: {
|
2018-11-06 18:00:03 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ ApplicationServices ];
|
2015-10-27 00:13:23 +00:00
|
|
|
preConfigure = ''
|
2018-11-06 18:00:03 +00:00
|
|
|
substituteInPlace src/Makefile.in --replace -F/System -F${ApplicationServices}
|
2015-10-27 00:13:23 +00:00
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-21 14:49:25 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXau = super.libXau.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-12-31 01:37:38 +00:00
|
|
|
propagatedBuildInputs = [ self.xorgproto ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXdmcp = super.libXdmcp.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXfont = super.libXfont.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-20 16:08:34 +01:00
|
|
|
propagatedBuildInputs = [ freetype ]; # propagate link reqs. like bzip2
|
2014-08-13 01:40:57 +01:00
|
|
|
# prevents "misaligned_stack_error_entering_dyld_stub_binder"
|
2019-10-26 16:39:27 +01:00
|
|
|
configureFlags = lib.optional isDarwin "CFLAGS=-O0";
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-06-09 18:47:31 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXxf86vm = super.libXxf86vm.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-21 14:49:25 +00:00
|
|
|
|
2011-02-09 15:09:29 +00:00
|
|
|
# Propagate some build inputs because of header file dependencies.
|
2011-02-14 10:04:37 +00:00
|
|
|
# Note: most of these are in Requires.private, so maybe builder.sh
|
|
|
|
# should propagate them automatically.
|
2018-08-19 11:55:08 +01:00
|
|
|
libXt = super.libXt.overrideAttrs (attrs: {
|
2018-05-13 16:31:24 +01:00
|
|
|
preConfigure = ''
|
2014-08-24 07:15:23 +01:00
|
|
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
|
|
|
'';
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.libSM ];
|
2018-12-12 00:53:20 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -";
|
2016-09-01 10:07:23 +01:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-21 14:49:25 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
luit = super.luit.overrideAttrs (attrs: {
|
2019-01-22 20:44:23 +00:00
|
|
|
# See https://bugs.freedesktop.org/show_bug.cgi?id=47792
|
|
|
|
# Once the bug is fixed upstream, this can be removed.
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--disable-selective-werror" ];
|
2019-01-22 20:44:23 +00:00
|
|
|
|
|
|
|
buildInputs = attrs.buildInputs ++ [libiconv];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-07-24 04:30:31 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libICE = super.libICE.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 13:50:31 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXcomposite = super.libXcomposite.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.libXfixes ];
|
|
|
|
});
|
2012-09-27 17:38:48 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXaw = super.libXaw.overrideAttrs (attrs: {
|
2016-09-01 10:07:23 +01:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.libXmu ];
|
|
|
|
});
|
2012-09-27 17:38:48 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXcursor = super.libXcursor.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXdamage = super.libXdamage.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXft = super.libXft.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-20 16:08:34 +01:00
|
|
|
propagatedBuildInputs = [ self.libXrender freetype fontconfig ];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2014-06-09 18:47:31 +01:00
|
|
|
# the include files need ft2build.h, and Requires.private isn't enough for us
|
|
|
|
postInstall = ''
|
2015-08-20 14:10:24 +01:00
|
|
|
sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc"
|
2014-06-09 18:47:31 +01:00
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
passthru = {
|
2018-08-20 16:08:34 +01:00
|
|
|
inherit freetype fontconfig;
|
2018-08-19 11:55:08 +01:00
|
|
|
};
|
|
|
|
});
|
2009-11-21 14:49:25 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXext = super.libXext.overrideAttrs (attrs: {
|
2017-07-11 09:51:18 +01:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2018-12-31 01:37:38 +00:00
|
|
|
propagatedBuildInputs = [ self.xorgproto self.libXau ];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-10-29 17:56:10 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXfixes = super.libXfixes.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXi = super.libXi.overrideAttrs (attrs: {
|
2017-07-11 09:51:18 +01:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.libXfixes ];
|
2019-10-26 16:39:27 +01:00
|
|
|
configureFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
"xorg_cv_malloc0_returns_null=no";
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXinerama = super.libXinerama.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-12-12 09:21:18 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXmu = super.libXmu.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2019-10-26 16:39:27 +01:00
|
|
|
buildFlags = [ "BITMAP_DEFINES='-DBITMAPDIR=\"/no-such-path\"'" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-08-21 19:36:06 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXrandr = super.libXrandr.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [self.libXrender];
|
|
|
|
});
|
2014-08-27 00:14:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libSM = super.libSM.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.libICE ];
|
|
|
|
});
|
2013-06-05 16:26:51 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXrender = super.libXrender.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2018-05-13 16:31:24 +01:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-12-31 01:37:38 +00:00
|
|
|
propagatedBuildInputs = [ self.xorgproto ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-06-05 16:26:51 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXres = super.libXres.overrideAttrs (attrs: {
|
2016-09-01 10:07:23 +01:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXv = super.libXv.overrideAttrs (attrs: {
|
2016-09-01 10:07:23 +01:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2018-11-29 02:37:26 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXvMC = super.libXvMC.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2018-12-12 00:45:27 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2018-12-31 01:37:38 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [self.xorgproto];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-06-05 16:26:51 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXp = super.libXp.overrideAttrs (attrs: {
|
2016-10-02 18:22:19 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-10-02 18:22:19 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXpm = super.libXpm.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "bin" "dev" "out" ]; # tiny man in $bin
|
2009-04-28 14:58:35 +01:00
|
|
|
patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in";
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libXpresent = super.libXpresent.overrideAttrs (attrs: {
|
|
|
|
buildInputs = with self; attrs.buildInputs ++ [ libXext libXfixes libXrandr ];
|
|
|
|
});
|
2015-05-24 22:46:56 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libxkbfile = super.libxkbfile.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to avoid propagation
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-11 20:24:05 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libxshmfence = super.libxshmfence.overrideAttrs (attrs: {
|
2018-03-07 10:50:35 +00:00
|
|
|
name = "libxshmfence-1.3";
|
2018-08-20 16:08:34 +01:00
|
|
|
src = fetchurl {
|
2018-03-07 10:50:35 +00:00
|
|
|
url = mirror://xorg/individual/lib/libxshmfence-1.3.tar.bz2;
|
|
|
|
sha256 = "1ir0j92mnd1nk37mrv9bz5swnccqldicgszvfsh62jd14q6k115q";
|
|
|
|
};
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to avoid propagation
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
libpciaccess = super.libpciaccess.overrideAttrs (attrs: {
|
2016-08-02 23:27:01 +01:00
|
|
|
meta = attrs.meta // { platforms = stdenv.lib.platforms.linux; };
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-08-02 23:27:01 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
setxkbmap = super.setxkbmap.overrideAttrs (attrs: {
|
2009-04-28 14:58:35 +01:00
|
|
|
postInstall =
|
|
|
|
''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share
|
2018-08-19 11:55:08 +01:00
|
|
|
ln -sfn ${self.xkeyboardconfig}/etc/X11 $out/share/X11
|
2009-04-28 14:58:35 +01:00
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
utilmacros = super.utilmacros.overrideAttrs (attrs: { # not needed for releases, we propagate the needed tools
|
2018-08-20 16:08:34 +01:00
|
|
|
propagatedBuildInputs = [ automake autoconf libtool ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2012-04-06 19:33:51 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
x11perf = super.x11perf.overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ [ freetype fontconfig ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2012-07-15 08:36:48 +01:00
|
|
|
|
2019-12-14 15:46:17 +00:00
|
|
|
xcbproto = super.xcbproto.override {
|
|
|
|
python = python3;
|
|
|
|
};
|
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutil = super.xcbutil.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-05 15:00:55 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutilcursor = super.xcbutilcursor.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-08-02 16:06:49 +01:00
|
|
|
meta = attrs.meta // { maintainers = [ stdenv.lib.maintainers.lovek323 ]; };
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-04-06 10:29:45 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutilimage = super.xcbutilimage.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutilkeysyms = super.xcbutilkeysyms.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-11 20:24:05 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutilrenderutil = super.xcbutilrenderutil.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcbutilwm = super.xcbutilwm.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-10-13 20:51:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # to get rid of xorgserver.dev; man is tiny
|
2009-04-28 14:58:35 +01:00
|
|
|
preBuild = "sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c";
|
2019-10-26 16:39:27 +01:00
|
|
|
installFlags = [
|
|
|
|
"sdkdir=${placeholder ''out''}/include/xorg"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86inputmouse = super.xf86inputmouse.overrideAttrs (attrs: {
|
2019-10-26 16:39:27 +01:00
|
|
|
installFlags = [
|
|
|
|
"sdkdir=${placeholder ''out''}/include/xorg"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2014-01-17 19:43:54 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86inputjoystick = super.xf86inputjoystick.overrideAttrs (attrs: {
|
2019-10-26 16:39:27 +01:00
|
|
|
installFlags = [
|
|
|
|
"sdkdir=${placeholder ''out''}/include/xorg"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2012-07-16 03:55:12 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
xf86inputlibinput = super.xf86inputlibinput.overrideAttrs (attrs: {
|
2017-10-28 12:52:52 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2019-10-26 16:39:27 +01:00
|
|
|
installFlags = [
|
|
|
|
"sdkdir=${placeholder ''dev''}/include/xorg"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-04-06 11:15:09 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86inputsynaptics = super.xf86inputsynaptics.overrideAttrs (attrs: {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ]; # *.pc pulls xorgserver.dev
|
2019-10-26 16:39:27 +01:00
|
|
|
installFlags = [
|
|
|
|
"sdkdir=${placeholder ''out''}/include/xorg"
|
|
|
|
"configdir=${placeholder ''out''}/share/X11/xorg.conf.d"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2009-11-04 19:53:23 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86inputvmmouse = super.xf86inputvmmouse.overrideAttrs (attrs: {
|
2013-04-18 20:33:17 +01:00
|
|
|
configureFlags = [
|
2019-10-26 16:39:27 +01:00
|
|
|
"--sysconfdir=${placeholder ''out''}/etc"
|
|
|
|
"--with-xorg-conf-dir=${placeholder ''out''}/share/X11/xorg.conf.d"
|
|
|
|
"--with-udev-rules-dir=${placeholder ''out''}/lib/udev/rules.d"
|
2013-04-18 20:33:17 +01:00
|
|
|
];
|
2017-11-30 17:03:14 +00:00
|
|
|
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-03-02 00:08:33 +00:00
|
|
|
|
2016-09-02 14:33:31 +01:00
|
|
|
# Obsolete drivers that don't compile anymore.
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videoark = super.xf86videoark.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videogeode = super.xf86videogeode.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videoglide = super.xf86videoglide.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videoi128 = super.xf86videoi128.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videonewport = super.xf86videonewport.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
2019-10-07 16:20:23 +01:00
|
|
|
xf86videos3virge = super.xf86videos3virge.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videosavage = super.xf86videosavage.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videotga = super.xf86videotga.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videov4l = super.xf86videov4l.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videovoodoo = super.xf86videovoodoo.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videowsfb = super.xf86videowsfb.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
|
2019-11-03 12:59:10 +00:00
|
|
|
xf86videoomap = super.xf86videoomap.overrideAttrs (attrs: {
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-overflow" ];
|
|
|
|
});
|
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videoamdgpu = super.xf86videoamdgpu.overrideAttrs (attrs: {
|
2016-08-21 10:28:41 +01:00
|
|
|
configureFlags = [ "--with-xorg-conf-dir=$(out)/share/X11/xorg.conf.d" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-08-21 10:28:41 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videoati = super.xf86videoati.overrideAttrs (attrs: {
|
|
|
|
NIX_CFLAGS_COMPILE = "-I${self.xorgserver.dev or self.xorgserver}/include/xorg";
|
|
|
|
});
|
2014-03-14 11:32:38 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: {
|
2019-05-28 20:09:34 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ [ mesa llvm_6 ]; # for libxatracker
|
2017-11-30 17:03:14 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-05-22 16:07:12 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videoqxl = super.xf86videoqxl.overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ [ spice-protocol ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-05-22 16:07:12 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videosiliconmotion = super.xf86videosiliconmotion.overrideAttrs (attrs: {
|
2017-11-30 17:03:14 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2017-11-30 17:03:14 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xdriinfo = super.xdriinfo.overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ [libGL];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2011-07-26 01:04:46 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xvinfo = super.xvinfo.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [self.libXext];
|
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xkbcomp = super.xkbcomp.overrideAttrs (attrs: {
|
|
|
|
configureFlags = [ "--with-xkb-config-root=${self.xkeyboardconfig}/share/X11/xkb" ];
|
|
|
|
});
|
2014-02-16 10:25:49 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xkeyboardconfig = super.xkeyboardconfig.overrideAttrs (attrs: {
|
2019-04-06 13:35:12 +01:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [intltool];
|
2014-02-16 10:25:49 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
configureFlags = [ "--with-xkb-rules-symlink=xorg" ];
|
|
|
|
|
2014-02-16 10:25:49 +00:00
|
|
|
# 1: compatibility for X11/xkb location
|
|
|
|
# 2: I think pkgconfig/ is supposed to be in /lib/
|
|
|
|
postInstall = ''
|
|
|
|
ln -s share "$out/etc"
|
2014-08-13 01:40:57 +01:00
|
|
|
mkdir -p "$out/lib" && ln -s ../share/pkgconfig "$out/lib/"
|
2014-02-16 10:25:49 +00:00
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2012-10-18 17:49:22 +01:00
|
|
|
|
2018-10-03 15:08:34 +01:00
|
|
|
# xkeyboardconfig variant extensible with custom layouts.
|
|
|
|
# See nixos/modules/services/x11/extra-layouts.nix
|
|
|
|
xkeyboardconfig_custom = { layouts ? { } }:
|
|
|
|
let
|
|
|
|
patchIn = name: layout:
|
|
|
|
with layout;
|
|
|
|
with lib;
|
|
|
|
''
|
|
|
|
# install layout files
|
|
|
|
${optionalString (compatFile != null) "cp '${compatFile}' 'compat/${name}'"}
|
|
|
|
${optionalString (geometryFile != null) "cp '${geometryFile}' 'geometry/${name}'"}
|
|
|
|
${optionalString (keycodesFile != null) "cp '${keycodesFile}' 'keycodes/${name}'"}
|
|
|
|
${optionalString (symbolsFile != null) "cp '${symbolsFile}' 'symbols/${name}'"}
|
|
|
|
${optionalString (typesFile != null) "cp '${typesFile}' 'types/${name}'"}
|
|
|
|
|
|
|
|
# patch makefiles
|
|
|
|
for type in compat geometry keycodes symbols types; do
|
|
|
|
if ! test -f "$type/${name}"; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
test "$type" = geometry && type_name=geom || type_name=$type
|
|
|
|
${ed}/bin/ed -v $type/Makefile.am <<EOF
|
|
|
|
/''${type_name}_DATA =
|
|
|
|
a
|
|
|
|
${name} \\
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
${ed}/bin/ed -v $type/Makefile.in <<EOF
|
|
|
|
/''${type_name}_DATA =
|
|
|
|
a
|
|
|
|
${name} \\
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
done
|
|
|
|
|
|
|
|
# add model description
|
|
|
|
${ed}/bin/ed -v rules/base.xml <<EOF
|
|
|
|
/<\/modelList>
|
|
|
|
-
|
|
|
|
a
|
|
|
|
<model>
|
|
|
|
<configItem>
|
|
|
|
<name>${name}</name>
|
2019-08-18 14:03:38 +01:00
|
|
|
<description>${layout.description}</description>
|
2018-10-03 15:08:34 +01:00
|
|
|
<vendor>${layout.description}</vendor>
|
|
|
|
</configItem>
|
|
|
|
</model>
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# add layout description
|
|
|
|
${ed}/bin/ed -v rules/base.xml <<EOF
|
|
|
|
/<\/layoutList>
|
|
|
|
-
|
|
|
|
a
|
|
|
|
<layout>
|
|
|
|
<configItem>
|
|
|
|
<name>${name}</name>
|
2019-08-18 14:03:38 +01:00
|
|
|
<shortDescription>${name}</shortDescription>
|
|
|
|
<description>${layout.description}</description>
|
2018-10-03 15:08:34 +01:00
|
|
|
<languageList>
|
|
|
|
${concatMapStrings (lang: "<iso639Id>${lang}</iso639Id>\n") layout.languages}
|
|
|
|
</languageList>
|
|
|
|
</configItem>
|
|
|
|
<variantList/>
|
|
|
|
</layout>
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
self.xkeyboardconfig.overrideAttrs (old: {
|
|
|
|
buildInputs = old.buildInputs ++ [ automake ];
|
|
|
|
postPatch = with lib; concatStrings (mapAttrsToList patchIn layouts);
|
|
|
|
});
|
|
|
|
|
2019-03-15 15:45:10 +00:00
|
|
|
xload = super.xload.overrideAttrs (attrs: {
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ gettext ];
|
|
|
|
});
|
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xlsfonts = super.xlsfonts.overrideAttrs (attrs: {
|
2018-08-04 15:04:51 +01:00
|
|
|
meta = attrs.meta // { license = lib.licenses.mit; };
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2018-08-04 15:04:51 +01:00
|
|
|
|
2018-12-31 01:37:38 +00:00
|
|
|
xorgproto = super.xorgproto.overrideAttrs (attrs: {
|
|
|
|
buildInputs = [];
|
2019-01-04 13:10:06 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ meson ninja ];
|
|
|
|
# adds support for printproto needed for libXp
|
|
|
|
mesonFlags = [ "-Dlegacy=true" ];
|
2018-12-31 01:37:38 +00:00
|
|
|
});
|
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed:
|
2017-01-29 23:02:48 +00:00
|
|
|
# exchange attrs if abiCompat is set
|
2016-05-22 21:16:12 +01:00
|
|
|
let
|
2019-11-24 17:22:28 +00:00
|
|
|
version = lib.getVersion attrs_passed;
|
2018-08-20 16:08:34 +01:00
|
|
|
attrs =
|
2018-12-31 01:37:38 +00:00
|
|
|
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
|
|
|
|
'';}
|
2018-08-20 16:08:34 +01:00
|
|
|
else if (abiCompat == "1.17") then {
|
2016-05-22 21:16:12 +01:00
|
|
|
name = "xorg-server-1.17.4";
|
|
|
|
builder = ./builder.sh;
|
|
|
|
src = fetchurl {
|
|
|
|
url = mirror://xorg/individual/xserver/xorg-server-1.17.4.tar.bz2;
|
|
|
|
sha256 = "0mv4ilpqi5hpg182mzqn766frhi6rw48aba3xfbaj4m82v0lajqc";
|
|
|
|
};
|
2017-09-05 23:03:42 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-12-31 01:37:38 +00:00
|
|
|
buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
|
2016-05-22 21:16:12 +01:00
|
|
|
meta.platforms = stdenv.lib.platforms.unix;
|
2018-08-20 16:08:34 +01:00
|
|
|
} else if (abiCompat == "1.18") then {
|
2017-01-29 23:02:48 +00:00
|
|
|
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";
|
|
|
|
};
|
2017-09-05 23:03:42 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2019-06-19 20:51:16 +01:00
|
|
|
buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
|
2018-05-11 22:01:40 +01:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isLinux "sed '1i#include <malloc.h>' -i include/os.h";
|
2017-01-29 23:02:48 +00:00
|
|
|
meta.platforms = stdenv.lib.platforms.unix;
|
2018-08-20 16:08:34 +01:00
|
|
|
} else throw "unsupported xorg abiCompat ${abiCompat} for ${attrs_passed.name}";
|
2016-05-22 21:16:12 +01:00
|
|
|
|
|
|
|
in attrs //
|
2014-08-13 01:40:57 +01:00
|
|
|
(let
|
2019-11-24 17:22:28 +00:00
|
|
|
version = lib.getVersion attrs;
|
2014-08-13 01:40:57 +01:00
|
|
|
commonBuildInputs = attrs.buildInputs ++ [ xtrans ];
|
|
|
|
commonPropagatedBuildInputs = [
|
2018-08-20 16:08:34 +01:00
|
|
|
zlib libGL libGLU dbus
|
2018-12-31 01:37:38 +00:00
|
|
|
xorgproto
|
|
|
|
libXext pixman libXfont libxshmfence libunwind
|
2017-02-12 12:12:10 +00:00
|
|
|
libXfont2
|
2011-02-15 14:34:26 +00:00
|
|
|
];
|
2014-08-13 01:40:57 +01:00
|
|
|
# XQuartz requires two compilations: the first to get X / XQuartz,
|
|
|
|
# and the second to get Xvfb, Xnest, etc.
|
|
|
|
darwinOtherX = overrideDerivation xorgserver (oldAttrs: {
|
|
|
|
configureFlags = oldAttrs.configureFlags ++ [
|
|
|
|
"--disable-xquartz"
|
|
|
|
"--enable-xorg"
|
|
|
|
"--enable-xvfb"
|
|
|
|
"--enable-xnest"
|
|
|
|
"--enable-kdrive"
|
|
|
|
];
|
|
|
|
postInstall = ":"; # prevent infinite recursion
|
|
|
|
});
|
|
|
|
in
|
|
|
|
if (!isDarwin)
|
|
|
|
then {
|
2016-08-29 01:30:01 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2019-05-28 20:09:34 +01:00
|
|
|
buildInputs = commonBuildInputs ++ [ libdrm mesa ];
|
2018-08-20 16:08:34 +01:00
|
|
|
propagatedBuildInputs = [ libpciaccess epoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
|
|
|
|
udev
|
2014-08-13 01:40:57 +01:00
|
|
|
];
|
2017-04-20 23:12:14 +01:00
|
|
|
prePatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
|
|
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
|
|
|
|
'';
|
2014-08-13 01:40:57 +01:00
|
|
|
configureFlags = [
|
2015-03-02 16:04:27 +00:00
|
|
|
"--enable-kdrive" # not built by default
|
2015-04-11 10:25:02 +01:00
|
|
|
"--enable-xephyr"
|
2014-08-13 01:40:57 +01:00
|
|
|
"--enable-xcsecurity" # enable SECURITY extension
|
|
|
|
"--with-default-font-path=" # there were only paths containing "${prefix}",
|
|
|
|
# and there are no fonts in this package anyway
|
2018-08-19 11:55:08 +01:00
|
|
|
"--with-xkb-bin-directory=${self.xkbcomp}/bin"
|
|
|
|
"--with-xkb-path=${self.xkeyboardconfig}/share/X11/xkb"
|
2017-01-17 23:57:15 +00:00
|
|
|
"--with-xkb-output=$out/share/X11/xkb/compiled"
|
2016-07-30 09:40:30 +01:00
|
|
|
"--enable-glamor"
|
2018-04-03 22:45:43 +01:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
"--disable-tls"
|
2014-08-13 01:40:57 +01:00
|
|
|
];
|
2018-05-13 14:41:31 +01:00
|
|
|
|
2014-08-13 01:40:57 +01:00
|
|
|
postInstall = ''
|
2016-12-03 17:07:04 +00:00
|
|
|
rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it
|
2015-10-26 09:59:20 +00:00
|
|
|
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
|
|
|
|
cd "$dev"
|
|
|
|
for f in include/xorg/*.h; do
|
|
|
|
sed "1i#line 1 \"${attrs.name}/$f\"" -i "$f"
|
|
|
|
done
|
|
|
|
)
|
2014-08-13 01:40:57 +01:00
|
|
|
'';
|
|
|
|
passthru.version = version; # needed by virtualbox guest additions
|
|
|
|
} else {
|
2018-08-20 16:08:34 +01:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook self.utilmacros self.fontutil ];
|
2015-09-23 00:26:48 +01:00
|
|
|
buildInputs = commonBuildInputs ++ [
|
2018-08-20 16:08:34 +01:00
|
|
|
bootstrap_cmds automake autoconf
|
2018-11-06 18:00:03 +00:00
|
|
|
Xplugin Carbon Cocoa
|
2015-09-23 00:26:48 +01:00
|
|
|
];
|
2014-08-13 01:40:57 +01:00
|
|
|
propagatedBuildInputs = commonPropagatedBuildInputs ++ [
|
2018-12-31 01:37:38 +00:00
|
|
|
libAppleWM xorgproto
|
2014-08-13 01:40:57 +01:00
|
|
|
];
|
2018-05-11 22:01:40 +01:00
|
|
|
|
2018-05-13 14:41:31 +01:00
|
|
|
patches = [
|
2019-11-07 16:35:04 +00:00
|
|
|
# XQuartz patchset
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2018-05-11 22:01:40 +01:00
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/e88fd6d785d5be477d5598e70d105ffb804771aa.patch";
|
|
|
|
sha256 = "1q0a30m1qj6ai924afz490xhack7rg4q3iig2gxsjjh98snikr1k";
|
|
|
|
name = "use-cppflags-not-cflags.patch";
|
|
|
|
})
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2018-05-11 22:01:40 +01:00
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/75ee9649bcfe937ac08e03e82fd45d9e18110ef4.patch";
|
|
|
|
sha256 = "1vlfylm011y00j8mig9zy6gk9bw2b4ilw2qlsc6la49zi3k0i9fg";
|
|
|
|
name = "use-old-mitrapezoids-and-mitriangles-routines.patch";
|
|
|
|
})
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2018-05-11 22:01:40 +01:00
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/c58f47415be79a6564a9b1b2a62c2bf866141e73.patch";
|
|
|
|
sha256 = "19sisqzw8x2ml4lfrwfvavc2jfyq2bj5xcf83z89jdxg8g1gdd1i";
|
|
|
|
name = "revert-fb-changes-1.patch";
|
|
|
|
})
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2018-05-11 22:01:40 +01:00
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/56e6f1f099d2821e5002b9b05b715e7b251c0c97.patch";
|
|
|
|
sha256 = "0zm9g0g1jvy79sgkvy0rjm6ywrdba2xjd1nsnjbxjccckbr6i396";
|
|
|
|
name = "revert-fb-changes-2.patch";
|
|
|
|
})
|
2014-08-13 01:40:57 +01:00
|
|
|
];
|
2018-05-11 22:01:40 +01:00
|
|
|
|
2014-08-13 01:40:57 +01:00
|
|
|
configureFlags = [
|
|
|
|
# note: --enable-xquartz is auto
|
|
|
|
"CPPFLAGS=-I${./darwin/dri}"
|
|
|
|
"--with-default-font-path="
|
|
|
|
"--with-apple-application-name=XQuartz"
|
|
|
|
"--with-apple-applications-dir=\${out}/Applications"
|
|
|
|
"--with-bundle-id-prefix=org.nixos.xquartz"
|
|
|
|
"--with-sha1=CommonCrypto"
|
|
|
|
];
|
|
|
|
preConfigure = ''
|
2018-01-09 03:14:48 +00:00
|
|
|
mkdir -p $out/Applications
|
2014-08-13 01:40:57 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
|
2018-11-06 18:00:03 +00:00
|
|
|
substituteInPlace hw/xquartz/pbproxy/Makefile.in --replace -F/System -F${ApplicationServices}
|
2014-08-13 01:40:57 +01:00
|
|
|
'';
|
|
|
|
postInstall = ''
|
|
|
|
rm -fr $out/share/X11/xkb/compiled
|
|
|
|
|
|
|
|
cp -rT ${darwinOtherX}/bin $out/bin
|
|
|
|
rm -f $out/bin/X
|
|
|
|
ln -s Xquartz $out/bin/X
|
|
|
|
|
|
|
|
cp ${darwinOtherX}/share/man -rT $out/share/man
|
|
|
|
'' ;
|
|
|
|
passthru.version = version;
|
2018-08-19 11:55:08 +01:00
|
|
|
}));
|
2009-10-02 19:03:23 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
lndir = super.lndir.overrideAttrs (attrs: {
|
2019-02-28 23:09:37 +00:00
|
|
|
buildInputs = [];
|
2010-07-16 23:04:56 +01:00
|
|
|
preConfigure = ''
|
2019-02-28 23:09:37 +00:00
|
|
|
export XPROTO_CFLAGS=" "
|
|
|
|
export XPROTO_LIBS=" "
|
2010-07-16 23:04:56 +01:00
|
|
|
substituteInPlace lndir.c \
|
2019-02-28 23:09:37 +00:00
|
|
|
--replace '<X11/Xos.h>' '<string.h>' \
|
|
|
|
--replace '<X11/Xfuncproto.h>' '<unistd.h>' \
|
|
|
|
--replace '_X_ATTRIBUTE_PRINTF(1,2)' '__attribute__((__format__(__printf__,1,2)))' \
|
|
|
|
--replace '_X_ATTRIBUTE_PRINTF(2,3)' '__attribute__((__format__(__printf__,2,3)))' \
|
|
|
|
--replace '_X_NORETURN' '__attribute__((noreturn))' \
|
2010-07-16 23:04:56 +01:00
|
|
|
--replace 'n_dirs--;' ""
|
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2010-07-16 23:04:56 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
twm = super.twm.overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [bison flex];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2011-03-17 15:51:13 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xauth = super.xauth.overrideAttrs (attrs: {
|
2018-04-25 04:20:18 +01:00
|
|
|
doCheck = false; # fails
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2018-04-25 04:20:18 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xcursorthemes = super.xcursorthemes.overrideAttrs (attrs: {
|
2019-01-12 10:20:43 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ self.xcursorgen self.xorgproto ];
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--with-cursordir=$(out)/share/icons" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-04-18 20:33:17 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xinit = (super.xinit.override {
|
2018-08-20 16:08:34 +01:00
|
|
|
stdenv = if isDarwin then clangStdenv else stdenv;
|
2018-08-19 11:55:08 +01:00
|
|
|
}).overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ lib.optional isDarwin bootstrap_cmds;
|
2014-08-13 01:40:57 +01:00
|
|
|
configureFlags = [
|
2018-08-19 11:55:08 +01:00
|
|
|
"--with-xserver=${self.xorgserver.out}/bin/X"
|
2014-08-13 01:40:57 +01:00
|
|
|
] ++ lib.optionals isDarwin [
|
|
|
|
"--with-bundle-id-prefix=org.nixos.xquartz"
|
|
|
|
"--with-launchdaemons-dir=\${out}/LaunchDaemons"
|
|
|
|
"--with-launchagents-dir=\${out}/LaunchAgents"
|
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
propagatedBuildInputs = [ self.xauth ]
|
2018-12-31 01:37:38 +00:00
|
|
|
++ lib.optionals isDarwin [ self.libX11 self.xorgproto ];
|
2012-11-22 01:26:11 +00:00
|
|
|
prePatch = ''
|
|
|
|
sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
|
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2012-11-22 01:26:11 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videointel = super.xf86videointel.overrideAttrs (attrs: {
|
2017-10-08 09:55:34 +01:00
|
|
|
# the update script only works with released tarballs :-/
|
2019-12-18 03:04:13 +00:00
|
|
|
name = "xf86-video-intel-2019-12-09";
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
group = "xorg";
|
|
|
|
owner = "driver";
|
|
|
|
repo = "xf86-video-intel";
|
|
|
|
rev = "f66d39544bb8339130c96d282a80f87ca1606caf";
|
|
|
|
sha256 = "14rwbbn06l8qpx7s5crxghn80vgcx8jmfc7qvivh72d81r0kvywl";
|
2017-10-08 09:55:34 +01:00
|
|
|
};
|
2018-08-19 11:55:08 +01:00
|
|
|
buildInputs = attrs.buildInputs ++ [self.libXfixes self.libXScrnSaver self.pixman];
|
2018-08-20 16:08:34 +01:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [autoreconfHook self.utilmacros];
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--with-default-dri=3" "--enable-tools" ];
|
2017-11-30 17:03:14 +00:00
|
|
|
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2013-06-05 16:26:51 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xf86videoxgi = super.xf86videoxgi.overrideAttrs (attrs: {
|
2016-08-29 09:25:12 +01:00
|
|
|
patches = [
|
|
|
|
# fixes invalid open mode
|
|
|
|
# https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/commit/?id=bd94c475035739b42294477cff108e0c5f15ef67
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2016-08-29 09:25:12 +01:00
|
|
|
url = "https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/patch/?id=bd94c475035739b42294477cff108e0c5f15ef67";
|
|
|
|
sha256 = "0myfry07655adhrpypa9rqigd6rfx57pqagcwibxw7ab3wjay9f6";
|
|
|
|
})
|
2018-08-20 16:08:34 +01:00
|
|
|
(fetchpatch {
|
2017-02-27 11:43:58 +00:00
|
|
|
url = "https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/patch/?id=78d1138dd6e214a200ca66fa9e439ee3c9270ec8";
|
|
|
|
sha256 = "0z3643afgrync280zrp531ija0hqxc5mrwjif9nh9lcnzgnz2d6d";
|
|
|
|
})
|
2016-08-29 09:25:12 +01:00
|
|
|
];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-08-29 09:25:12 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xorgcffiles = super.xorgcffiles.overrideAttrs (attrs: {
|
2018-05-19 21:21:40 +01:00
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace $out/lib/X11/config/darwin.cf --replace "/usr/bin/" ""
|
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2018-05-19 21:21:40 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xwd = super.xwd.overrideAttrs (attrs: {
|
2019-03-19 04:40:37 +00:00
|
|
|
buildInputs = with self; attrs.buildInputs ++ [libXt];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-07-26 23:25:53 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xrdb = super.xrdb.overrideAttrs (attrs: {
|
2018-08-20 16:08:34 +01:00
|
|
|
configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ];
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2015-08-28 23:06:06 +01:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
sessreg = super.sessreg.overrideAttrs (attrs: {
|
2016-01-26 01:04:05 +00:00
|
|
|
preBuild = "sed -i 's|gcc -E|gcc -E -P|' man/Makefile";
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2016-01-26 01:04:05 +00:00
|
|
|
|
2018-08-19 11:55:08 +01:00
|
|
|
xrandr = super.xrandr.overrideAttrs (attrs: {
|
2017-01-11 18:53:38 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/xkeystone
|
|
|
|
'';
|
2018-08-19 11:55:08 +01:00
|
|
|
});
|
2019-06-11 23:10:32 +01:00
|
|
|
|
|
|
|
xcalc = super.xcalc.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or [] ++ [
|
|
|
|
"--with-appdefaultdir=${placeholder "out"}/share/X11/app-defaults"
|
|
|
|
];
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs or [] ++ [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/xcalc \
|
|
|
|
--set XAPPLRESDIR ${placeholder "out"}/share/X11/app-defaults
|
|
|
|
'';
|
|
|
|
});
|
2009-04-28 14:58:35 +01:00
|
|
|
}
|