HipChat (or rather its copy of Qt) expects to find keyboard data in
/usr/share/X11/xkb. So use a LD_PRELOAD library to intercept and
rewrite the Glibc calls that access those paths. We've been doing the
same thing with packages like Spotify, but now this functionality has
been abstracted into a reusable library, libredirect.so. It uses an
environment variable $NIX_REDIRECTS containing a colon-separated list
of path prefixes to be rewritten, e.g. "/foo=bar:/xyzzy=/fnord".
Verified on OS X 10.9.2 to build and check, dependents build fine too.
@vcunat enabled doCheck as it works for him on x86_64-linux;
also did style nitpick modification, and changed platforms to .all
according to the homepage http://www.swig.org/compat.html
$ nix-env -f . -qa '*' --meta --xml --drv-path --show-trace
error: while querying the derivation named `clementine-1.2.1':
while evaluating `optional' at .../lib/lists.nix:113:20, called from .../pkgs/applications/audio/clementine/default.nix:50:22:
undefined variable `not' at .../pkgs/applications/audio/clementine/default.nix:50:32
For some reason library paths are not set at all for some libraries during
the build. Wrapper with LD_LIBRARY_PATH set for relevant libraries is currently
solution.
Clementine has an optional dependency on libspotify, which is unfree.
Enabling libspotify unconditionally prevented Hydra from distributing
Clementine. Now, we optionally enable it based on
config.clementine.spotify.
The file $out/mkspecs/qconfig.pri contains a list of all include /
library paths used during the build, including build-time-only
packages like GDB and Ruby. So get rid of those.
Building the tests (which as far as I can tell we don't even run)
makes the build take > 19 GiB of disk space, which is a bit
excessive. Without the tests, it takes 2.6 GiB.
This allows it to keep building after
ba5473676f was pushed. Perhaps we should
add the extra OpenGL versions (2.9.1.0) and specify strict versions so
that it doesn't fail to build in 2 weeks.