Merge pull request #1928 from 'cross-win-osx'.

This includes a lot of fixes for cross-building to Windows and Mac OS X
and could possibly fix things even for non-cross-builds, like for
example OpenSSL on Windows.

The main reason for merging this in 14.04 already is that we already
have runInWindowsVM in master and it doesn't work until we actually
cross-build Cygwin's setup binary as the upstream version is a fast
moving target which gets _overwritten_ on every new release.

Conflicts:
	pkgs/top-level/all-packages.nix
This commit is contained in:
aszlig
2014-04-21 10:00:35 +02:00
36 changed files with 523 additions and 124 deletions
+6 -2
View File
@@ -1,4 +1,6 @@
{ stdenv, fetchurl, xproto, libXt, libX11 }:
{ stdenv, fetchurl, xproto, libXt, libX11, gifview ? false, static ? false }:
with stdenv.lib;
stdenv.mkDerivation {
name = "gifsicle-1.78";
@@ -8,7 +10,9 @@ stdenv.mkDerivation {
sha256 = "0dzp5sg82klji4lbj1m4cyg9fb3l837gkipdx657clib97klyv53";
};
buildInputs = [ xproto libXt libX11 ];
buildInputs = optional gifview [ xproto libXt libX11 ];
LDFLAGS = optional static "-static";
meta = {
description = "Command-line tool for creating, editing, and getting information about GIF images and animations";
+21 -1
View File
@@ -1,7 +1,9 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, libpng, static ? false }:
# This package comes with its own copy of zlib, libpng and pngxtern
with stdenv.lib;
stdenv.mkDerivation rec {
name = "optipng-0.7.4";
@@ -10,6 +12,24 @@ stdenv.mkDerivation rec {
sha256 = "1zrphbz17rhhfl1l95q5s979rrhifbwczl2xj1fdrnq5jid5s2sj";
};
buildInputs = [ libpng ];
LDFLAGS = optional static "-static";
configureFlags = "--with-system-zlib --with-system-libpng";
crossAttrs = {
CC="${stdenv.cross.config}-gcc";
LD="${stdenv.cross.config}-gcc";
AR="${stdenv.cross.config}-ar";
RANLIB="${stdenv.cross.config}-ranlib";
configurePhase = ''
./configure -prefix="$out" --with-system-zlib --with-system-libpng
'';
postInstall = optional (stdenv.cross.libc == "msvcrt") ''
mv "$out"/bin/optipng "$out"/bin/optipng.exe
'';
};
meta = {
homepage = http://optipng.sourceforge.net/;
description = "A PNG optimizer";