NixOS/nixpkgs — pull request #1928 by aszlig (2014-03-12 12:44:42+00:00)
Title: Windows and OS X cross builds generalization and cleanup.

This is a merge of my cross-building branches for OS X and Windows (MinGW-w64) and this branch is for working on generalization of both cross-builds and also cleaning up old cruft.

Also, again, I'd welcome any comments/ideas/suggestion on that topic (already asked for that in #1876).

So right now, the remaining todos/questions are:

* [ ] Add a `stdenv.isDarwinTarget`, `stdenv.isLinuxTarget` and `stdenv.isWindowsTarget` which essentially are something like for example `isWindows = if stdenv ? cross then stdenv.cross.libc == "msvcrt" else stdenv.isWindows`, so if you're not cross-compiling, the `*Target` attribute reflects the native architecture.
* [ ] Remove old MinGW(32)-specific stuff. Non-MinGW-w64 builds are broken right now anyway and if noone starts to shed a tear, I'm going to remove it as MinGW-w64 is able to compile to 32 _and_ 64 bit PE.
* [ ] Check whether things such as `opensslCrossSystem` are still necessary and why they were introduced in the first place.
* [ ] Enable running of tests using `runInWindowsVM` and `runInMacOSXVM`.
* [ ] Clean up `release-cross.nix`.
* [ ] Improve cross-building with cmake.
* [ ] Evaluate use of --with-sysroot for *all* cross-architectures in `gcc-stage-final` (according to the GCC
docs, the options `--with-headers` and `--with-libs` are [deprecated](http://gcc.gnu.org/install/configure.html#TOC3)).
* [ ] Maybe allow to assign/match platform meta attributes with cross targets?