2010-11-29 19:00:26 +01:00
|
|
|
{stdenv, fetchurl, perl, zlib, libjpeg, freetype, libpng, giflib
|
|
|
|
, enableX11 ? true, libX11, xproto, xextproto, libXext, renderproto, libXrender
|
|
|
|
, enableSDL ? true, SDL }:
|
|
|
|
|
2009-11-05 22:10:03 +01:00
|
|
|
let s = import ./src-for-default.nix; in
|
2006-11-14 23:23:33 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-11-05 22:10:03 +01:00
|
|
|
inherit (s) name;
|
2006-11-14 23:23:33 +01:00
|
|
|
src = fetchurl {
|
2009-11-05 22:10:03 +01:00
|
|
|
url = s.url;
|
|
|
|
sha256 = s.hash;
|
2006-11-14 23:23:33 +01:00
|
|
|
};
|
2010-11-29 19:00:26 +01:00
|
|
|
|
2012-01-20 01:45:22 +01:00
|
|
|
patches = [ ./ftbfs.patch ];
|
|
|
|
|
2010-11-29 19:00:26 +01:00
|
|
|
buildNativeInputs = [ perl ];
|
|
|
|
|
|
|
|
buildInputs = [ zlib libjpeg freetype giflib libpng ]
|
|
|
|
++ stdenv.lib.optional enableSDL SDL
|
|
|
|
++ stdenv.lib.optionals enableX11 [
|
|
|
|
xproto libX11 libXext xextproto
|
|
|
|
renderproto libXrender
|
2009-11-05 22:10:03 +01:00
|
|
|
];
|
2010-11-29 19:00:26 +01:00
|
|
|
|
2009-11-05 22:10:03 +01:00
|
|
|
NIX_LDFLAGS="-lgcc_s";
|
2010-11-29 19:00:26 +01:00
|
|
|
|
2009-10-24 17:39:54 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-sdl"
|
|
|
|
"--enable-zlib"
|
|
|
|
"--with-gfxdrivers=all"
|
2009-11-05 22:10:03 +01:00
|
|
|
"--enable-devmem"
|
|
|
|
"--enable-fbdev"
|
|
|
|
"--enable-mmx"
|
|
|
|
"--enable-sse"
|
|
|
|
"--enable-sysfs"
|
|
|
|
"--with-software"
|
|
|
|
"--with-smooth-scaling"
|
2010-11-29 19:00:26 +01:00
|
|
|
] ++ stdenv.lib.optionals enableX11 [
|
|
|
|
"--enable-x11"
|
2009-10-24 17:39:54 +02:00
|
|
|
];
|
2006-11-14 23:23:33 +01:00
|
|
|
}
|