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