From 6300b4717b72941af093a0c3ff7efb4f14d0ed7f Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sat, 29 Aug 2015 01:06:06 +0300 Subject: [PATCH] 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 (cherry picked from commit 6b866a37fc62321b42a6dd82f058d5c152c1c6e7) --- pkgs/servers/x11/xorg/overrides.nix | 4 ++++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 71185643a9e69..2036e62ee945e 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -421,4 +421,8 @@ in outputs = [ "out" "doc" ]; }; + xrdb = attrs: attrs // { + configureFlags = "--with-cpp=${args.mcpp}/bin/mcpp"; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bfc211310b425..57a50ed6970a1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9359,7 +9359,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;