2005-08-24 17:02:30 +02:00
|
|
|
{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false
|
2007-10-26 21:47:35 +02:00
|
|
|
, xineramaSupport ? false, randrSupport ? false, dvdnavSupport ? true
|
2010-04-14 14:13:01 +02:00
|
|
|
, stdenv, fetchurl, x11, freetype, fontconfig, zlib
|
2006-12-05 23:28:45 +01:00
|
|
|
, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null
|
2007-10-26 21:47:35 +02:00
|
|
|
, libXinerama ? null, libXrandr ? null, libdvdnav ? null
|
2008-03-06 10:34:36 +01:00
|
|
|
, cdparanoia ? null, cddaSupport ? true
|
2009-10-04 23:31:34 +02:00
|
|
|
, amrnb ? null, amrwb ? null, amrSupport ? false
|
2010-04-14 14:13:01 +02:00
|
|
|
, jackaudioSupport ? false, jackaudio ? null
|
2010-04-30 10:33:47 +02:00
|
|
|
, x264Support ? false, x264 ? null
|
2009-10-04 23:31:34 +02:00
|
|
|
, mesa, pkgconfig, unzip
|
2005-08-24 17:02:30 +02:00
|
|
|
}:
|
2003-11-11 16:01:07 +01:00
|
|
|
|
2004-03-29 12:25:25 +02:00
|
|
|
assert alsaSupport -> alsa != null;
|
2004-05-01 20:17:56 +02:00
|
|
|
assert xvSupport -> libXv != null;
|
2005-02-16 17:18:43 +01:00
|
|
|
assert theoraSupport -> libtheora != null;
|
2005-08-24 17:02:30 +02:00
|
|
|
assert cacaSupport -> libcaca != null;
|
2005-10-29 21:07:27 +02:00
|
|
|
assert xineramaSupport -> libXinerama != null;
|
2006-04-18 20:46:36 +02:00
|
|
|
assert randrSupport -> libXrandr != null;
|
2007-10-26 21:47:35 +02:00
|
|
|
assert dvdnavSupport -> libdvdnav != null;
|
2008-03-06 10:34:36 +01:00
|
|
|
assert cddaSupport -> cdparanoia != null;
|
2010-04-14 14:13:01 +02:00
|
|
|
assert jackaudioSupport -> jackaudio != null;
|
2009-10-04 23:31:34 +02:00
|
|
|
assert amrSupport -> (amrnb != null && amrwb != null);
|
2003-11-11 16:01:07 +01:00
|
|
|
|
2006-12-05 23:28:45 +01:00
|
|
|
let
|
2003-11-11 16:01:07 +01:00
|
|
|
|
2010-04-14 14:13:01 +02:00
|
|
|
codecs = stdenv.mkDerivation {
|
|
|
|
name = "MPlayer-codecs-essential-20071007";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2;
|
|
|
|
sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic";
|
|
|
|
};
|
2004-04-01 20:06:09 +02:00
|
|
|
|
2010-04-14 14:13:01 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -prv * $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = "unfree";
|
|
|
|
};
|
2008-04-11 00:12:14 +02:00
|
|
|
};
|
|
|
|
|
2010-04-14 14:13:01 +02:00
|
|
|
in
|
2006-12-05 23:28:45 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2010-04-14 14:13:01 +02:00
|
|
|
name = "MPlayer-1.0-pre-rc4-20100213";
|
2006-12-05 23:28:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-04-14 14:13:01 +02:00
|
|
|
url = mirror://gentoo/distfiles/mplayer-1.0_rc4_p20100213.tbz2;
|
|
|
|
sha256 = "1c5w49vqavs9pnc5av89v502wfa5g7hfn65ffhpx25ddi1irzh2r";
|
2006-12-05 23:28:45 +01:00
|
|
|
};
|
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
buildInputs =
|
2010-04-14 14:13:01 +02:00
|
|
|
[ x11 libXv freetype zlib mesa pkgconfig ]
|
2009-03-10 22:03:51 +01:00
|
|
|
++ stdenv.lib.optional alsaSupport alsa
|
|
|
|
++ stdenv.lib.optional xvSupport libXv
|
|
|
|
++ stdenv.lib.optional theoraSupport libtheora
|
|
|
|
++ stdenv.lib.optional cacaSupport libcaca
|
|
|
|
++ stdenv.lib.optional xineramaSupport libXinerama
|
|
|
|
++ stdenv.lib.optional randrSupport libXrandr
|
2010-04-14 14:13:01 +02:00
|
|
|
++ stdenv.lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
|
2009-10-04 23:31:34 +02:00
|
|
|
++ stdenv.lib.optional cddaSupport cdparanoia
|
2010-04-14 14:13:01 +02:00
|
|
|
++ stdenv.lib.optional jackaudioSupport jackaudio
|
2010-04-30 10:33:47 +02:00
|
|
|
++ stdenv.lib.optionals amrSupport [ amrnb amrwb ]
|
|
|
|
++ stdenv.lib.optional x264Support x264;
|
2005-08-24 17:02:30 +02:00
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
configureFlags = ''
|
2006-12-05 23:28:45 +01:00
|
|
|
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
2009-03-10 22:03:51 +01:00
|
|
|
${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
|
2010-04-30 10:33:47 +02:00
|
|
|
${if x264Support then "--enable-x264 --extra-libs=-lx264" else ""}
|
2010-04-14 14:13:01 +02:00
|
|
|
--codecsdir=${codecs}
|
2006-12-05 23:28:45 +01:00
|
|
|
--enable-runtime-cpudetection
|
2010-04-14 14:13:01 +02:00
|
|
|
--enable-x11
|
2006-12-05 23:28:45 +01:00
|
|
|
--disable-xanim
|
2009-02-17 17:10:19 +01:00
|
|
|
--disable-ivtv
|
2009-03-10 22:03:51 +01:00
|
|
|
'';
|
2006-12-05 23:28:45 +01:00
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
NIX_LDFLAGS = "-lX11 -lXext";
|
2007-10-26 21:47:35 +02:00
|
|
|
|
2006-10-11 18:45:55 +02:00
|
|
|
meta = {
|
|
|
|
description = "A movie player that supports many video formats";
|
2008-03-06 10:34:36 +01:00
|
|
|
homepage = "http://mplayerhq.hu";
|
|
|
|
license = "GPL";
|
2010-04-14 14:13:01 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2006-10-11 18:45:55 +02:00
|
|
|
};
|
2003-11-11 16:01:07 +01:00
|
|
|
}
|