2006-09-12 00:06:26 +01:00
|
|
|
{ stdenv, fetchurl, x11, libXrandr, openglSupport ? false, mesa ? null
|
|
|
|
, alsaSupport ? true, alsaLib ? null
|
|
|
|
}:
|
2006-01-26 14:01:08 +00:00
|
|
|
|
|
|
|
assert openglSupport -> mesa != null;
|
2006-09-12 00:06:26 +01:00
|
|
|
assert alsaSupport -> alsaLib != null;
|
2004-09-26 19:12:51 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2006-09-12 00:06:26 +01:00
|
|
|
name = "SDL-1.2.11";
|
2004-09-26 19:12:51 +01:00
|
|
|
src = fetchurl {
|
2007-08-24 13:32:36 +01:00
|
|
|
url = http://www.libsdl.org/release/SDL-1.2.11.tar.gz;
|
2006-09-12 00:06:26 +01:00
|
|
|
md5 = "418b42956b7cd103bfab1b9077ccc149";
|
2004-09-26 19:12:51 +01:00
|
|
|
};
|
2006-09-12 01:15:05 +01:00
|
|
|
propagatedBuildInputs = [x11 libXrandr];
|
|
|
|
buildInputs =
|
|
|
|
(if openglSupport then [mesa] else []) ++
|
|
|
|
(if alsaSupport then [alsaLib] else []);
|
2006-09-12 00:06:26 +01:00
|
|
|
configureFlags = "
|
|
|
|
--disable-x11-shared --disable-alsa-shared --enable-rpath
|
2006-09-12 01:15:05 +01:00
|
|
|
${if alsaSupport then "--with-alsa-prefix=${alsaLib}/lib" else ""}
|
2006-09-12 00:06:26 +01:00
|
|
|
";
|
|
|
|
# patches = [./no-cxx.patch];
|
|
|
|
# NIX_CFLAGS_COMPILE = "-DBITS_PER_LONG=32"; /* !!! hack around kernel header bug */
|
2006-01-26 14:01:08 +00:00
|
|
|
inherit openglSupport;
|
2004-09-26 19:12:51 +01:00
|
|
|
}
|