nixpkgs/pkgs/development/libraries/SDL/default.nix
Eelco Dolstra a0159dee8e * Reverted r6713, r6711, r4623, r3660, r2237. There rewrote fetchurl
URLs to http://nix.cs.uu.nl/dist/tarballs.  With content-addressable
  mirror support (r9190, NIXPKGS-70) this is no longer necessary:
  fetchurl will try to download from that location automatically.  So
  we can keep the original URLs.

svn path=/nixpkgs/trunk/; revision=9192
2007-08-24 12:32:36 +00:00

25 lines
818 B
Nix

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