xrdb: Use mcpp as the preprocessor

Close #9501, fixes #9480.

By default, xrdb uses GCC as the preprocessor at runtime for X resource files.
However, gcc is a large dependency, so replace it with mcpp, a much smaller
preprocessor (currently under a megabyte on i686).

Arch Linux already does this as well, so this should be relatively safe:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/xorg-xrdb
This commit is contained in:
Tuomas Tynkkynen 2015-08-29 01:06:06 +03:00 committed by Vladimír Čunát
parent d2dce19793
commit 6b866a37fc
2 changed files with 5 additions and 1 deletions

View File

@ -421,4 +421,8 @@ in
outputs = [ "out" "doc" ];
};
xrdb = attrs: attrs // {
configureFlags = "--with-cpp=${args.mcpp}/bin/mcpp";
};
}

View File

@ -9374,7 +9374,7 @@ let
xorg = recurseIntoAttrs (import ../servers/x11/xorg/default.nix {
inherit clangStdenv fetchurl fetchgit fetchpatch stdenv pkgconfig intltool freetype fontconfig
libxslt expat libpng zlib perl mesa_drivers spice_protocol
dbus libuuid openssl gperf m4 libevdev tradcpp libinput makeWrapper autoreconfHook
dbus libuuid openssl gperf m4 libevdev tradcpp libinput mcpp makeWrapper autoreconfHook
autoconf automake libtool xmlto asciidoc flex bison python mtdev pixman;
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
mesa = mesa_noglu;