2010-08-20 22:09:22 +02:00
|
|
|
{ alsaSupport ? true, xvSupport ? true, theoraSupport ? true, cacaSupport ? true
|
|
|
|
, xineramaSupport ? true, randrSupport ? true, dvdnavSupport ? true
|
|
|
|
, stdenv, fetchurl, fetchsvn, x11, freetype, fontconfig, zlib
|
|
|
|
, alsaLib, libX11, libXv, libtheora, libcaca
|
|
|
|
, libXinerama, libXrandr, libdvdnav
|
|
|
|
, cdparanoia, cddaSupport ? true
|
|
|
|
, pulseaudio, pulseSupport ? true
|
|
|
|
, amrnb, amrwb, amrSupport ? false
|
|
|
|
, jackaudioSupport ? false, jackaudio
|
|
|
|
, x264Support ? true, x264
|
|
|
|
, xvidSupport ? true, xvidcore
|
|
|
|
, lameSupport ? true, lame
|
|
|
|
, screenSaverSupport ? true, libXScrnSaver
|
2010-05-25 20:39:29 +02:00
|
|
|
, mesa, pkgconfig, unzip, yasm
|
2005-08-24 17:02:30 +02:00
|
|
|
}:
|
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-08-20 22:09:22 +02:00
|
|
|
codecs_src =
|
|
|
|
let
|
|
|
|
dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/;
|
|
|
|
in
|
|
|
|
if stdenv.system == "i686-linux" then fetchurl {
|
|
|
|
url = "${dir}/essential-20071007.tar.bz2";
|
|
|
|
sha256 = "18vls12n12rjw0mzw4pkp9vpcfmd1c21rzha19d7zil4hn7fs2ic";
|
|
|
|
} else if stdenv.system == "x86_64-linux" then fetchurl {
|
|
|
|
url = "${dir}/essential-amd64-20071007.tar.bz2";
|
|
|
|
sha256 = "13xf5b92w1ra5hw00ck151lypbmnylrnznq9hhb0sj36z5wz290x";
|
|
|
|
} else if stdenv.system == "powerpc-linux" then fetchurl {
|
|
|
|
url = "${dir}/essential-ppc-20071007.tar.bz2";
|
|
|
|
sha256 = "18mlj8dp4wnz42xbhdk1jlz2ygra6fbln9wyrcyvynxh96g1871z";
|
|
|
|
} else null;
|
|
|
|
|
|
|
|
codecs = if codecs_src != null then stdenv.mkDerivation {
|
2010-04-14 14:13:01 +02:00
|
|
|
name = "MPlayer-codecs-essential-20071007";
|
|
|
|
|
2010-08-20 22:09:22 +02:00
|
|
|
src = codecs_src;
|
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";
|
|
|
|
};
|
2010-08-20 22:09:22 +02:00
|
|
|
} else null;
|
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-05-18 10:48:43 +02:00
|
|
|
name = "MPlayer-1.0-pre-rc4-20100506";
|
2006-12-05 23:28:45 +01:00
|
|
|
|
2010-08-20 22:09:22 +02:00
|
|
|
src = fetchsvn {
|
|
|
|
url = svn://svn.mplayerhq.hu/mplayer/trunk;
|
|
|
|
rev = 31984;
|
|
|
|
sha256 = "01niw0c7fwbp4v25k08c2rac8z55jp2wh5ikhsjn65ybg8f1v150";
|
2006-12-05 23:28:45 +01:00
|
|
|
};
|
|
|
|
|
2009-03-10 22:03:51 +01:00
|
|
|
buildInputs =
|
2010-05-25 20:39:29 +02:00
|
|
|
[ x11 libXv freetype zlib mesa pkgconfig yasm ]
|
2010-08-20 22:09:22 +02:00
|
|
|
++ stdenv.lib.optional alsaSupport alsaLib
|
2009-03-10 22:03:51 +01:00
|
|
|
++ 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 ]
|
2010-04-30 23:47:09 +02:00
|
|
|
++ stdenv.lib.optional x264Support x264
|
2010-05-25 20:39:29 +02:00
|
|
|
++ stdenv.lib.optional xvidSupport xvidcore
|
2010-08-20 22:09:22 +02:00
|
|
|
++ stdenv.lib.optional pulseSupport pulseaudio
|
|
|
|
++ stdenv.lib.optional screenSaverSupport libXScrnSaver
|
2010-05-25 20:39:29 +02:00
|
|
|
++ stdenv.lib.optional lameSupport lame;
|
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-08-20 22:09:22 +02:00
|
|
|
${if codecs != null then "--codecsdir=${codecs}" else ""}
|
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-08-20 22:09:22 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco stdenv.lib.maintainers.urkud ];
|
2006-10-11 18:45:55 +02:00
|
|
|
};
|
2003-11-11 16:01:07 +01:00
|
|
|
}
|