@ -1,37 +1,40 @@
{ alsaSupport ? false , xvSupport ? true , theoraSupport ? false , cacaSupport ? false
, xineramaSupport ? false , randrSupport ? false , dvdnavSupport ? true
, stdenv , fetchurl , x11 , freetype , fontconfig , zlib
, alsa ? null , libX11 , libXv ? null , libtheora ? null , libcaca ? null
, libXinerama ? null , libXrandr ? null , libdvdnav ? null
, cdparanoia ? null , cddaSupport ? true
, amrnb ? null , amrwb ? null , amrSupport ? false
, jackaudioSupport ? false , jackaudio ? null
, x264Support ? false , x264 ? null
, xvidSupport ? false , xvidcore ? null
, lameSupport ? true , lame ? null
{ 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
, mesa , pkgconfig , unzip , yasm
} :
assert alsaSupport -> alsa != null ;
assert xvSupport -> libXv != null ;
assert theoraSupport -> libtheora != null ;
assert cacaSupport -> libcaca != null ;
assert xineramaSupport -> libXinerama != null ;
assert randrSupport -> libXrandr != null ;
assert dvdnavSupport -> libdvdnav != null ;
assert cddaSupport -> cdparanoia != null ;
assert jackaudioSupport -> jackaudio != null ;
assert amrSupport -> ( amrnb != null && amrwb != null ) ;
let
codecs = stdenv . mkDerivation {
codecs_src =
let
dir = http://www.mplayerhq.hu/MPlayer/releases/codecs/ ;
in
if stdenv . system == " i 6 8 6 - l i n u x " then fetchurl {
url = " ${ dir } / e s s e n t i a l - 2 0 0 7 1 0 0 7 . t a r . b z 2 " ;
sha256 = " 1 8 v l s 1 2 n 1 2 r j w 0 m z w 4 p k p 9 v p c f m d 1 c 2 1 r z h a 1 9 d 7 z i l 4 h n 7 f s 2 i c " ;
} else if stdenv . system == " x 8 6 _ 6 4 - l i n u x " then fetchurl {
url = " ${ dir } / e s s e n t i a l - a m d 6 4 - 2 0 0 7 1 0 0 7 . t a r . b z 2 " ;
sha256 = " 1 3 x f 5 b 9 2 w 1 r a 5 h w 0 0 c k 1 5 1 l y p b m n y l r n z n q 9 h h b 0 s j 3 6 z 5 w z 2 9 0 x " ;
} else if stdenv . system == " p o w e r p c - l i n u x " then fetchurl {
url = " ${ dir } / e s s e n t i a l - p p c - 2 0 0 7 1 0 0 7 . t a r . b z 2 " ;
sha256 = " 1 8 m l j 8 d p 4 w n z 4 2 x b h d k 1 j l z 2 y g r a 6 f b l n 9 w y r c y v y n x h 9 6 g 1 8 7 1 z " ;
} else null ;
codecs = if codecs_src != null then stdenv . mkDerivation {
name = " M P l a y e r - c o d e c s - e s s e n t i a l - 2 0 0 7 1 0 0 7 " ;
src = fetchurl {
url = http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2 ;
sha256 = " 1 8 v l s 1 2 n 1 2 r j w 0 m z w 4 p k p 9 v p c f m d 1 c 2 1 r z h a 1 9 d 7 z i l 4 h n 7 f s 2 i c " ;
} ;
src = codecs_src ;
installPhase = ''
mkdir $ out
@ -41,21 +44,22 @@ let
meta = {
license = " u n f r e e " ;
} ;
} ;
} else null ;
in
stdenv . mkDerivation {
name = " M P l a y e r - 1 . 0 - p r e - r c 4 - 2 0 1 0 0 5 0 6 " ;
src = fetchurl {
url = mirror://gentoo/distfiles/mplayer-1.0_rc4_p20100506.tar.bz2 ;
sha256 = " 0 r h s 0 m v 2 1 6 i i r 8 c z 1 3 x d q 0 r s 8 8 l c 4 8 c i i y n 0 w q z x j r n j b 1 7 y a j y 6 " ;
src = fetchsvn {
url = svn://svn.mplayerhq.hu/mplayer/trunk ;
rev = 31984 ;
sha256 = " 0 1 n i w 0 c 7 f w b p 4 v 2 5 k 0 8 c 2 r a c 8 z 5 5 j p 2 w h 5 i k h s j n 6 5 y b g 8 f 1 v 1 5 0 " ;
} ;
buildInputs =
[ x11 libXv freetype zlib mesa pkgconfig yasm ]
++ stdenv . lib . optional alsaSupport alsa
++ stdenv . lib . optional alsaSupport alsaLib
++ stdenv . lib . optional xvSupport libXv
++ stdenv . lib . optional theoraSupport libtheora
++ stdenv . lib . optional cacaSupport libcaca
@ -67,13 +71,15 @@ stdenv.mkDerivation {
++ stdenv . lib . optionals amrSupport [ amrnb amrwb ]
++ stdenv . lib . optional x264Support x264
++ stdenv . lib . optional xvidSupport xvidcore
++ stdenv . lib . optional pulseSupport pulseaudio
++ stdenv . lib . optional screenSaverSupport libXScrnSaver
++ stdenv . lib . optional lameSupport lame ;
configureFlags = ''
$ { if cacaSupport then " - - e n a b l e - c a c a " else " - - d i s a b l e - c a c a " }
$ { if dvdnavSupport then " - - e n a b l e - d v d n a v - - e n a b l e - d v d r e a d - - d i s a b l e - d v d r e a d - i n t e r n a l " else " " }
$ { if x264Support then " - - e n a b l e - x 2 6 4 - - e x t r a - l i b s = - l x 2 6 4 " else " " }
- - codecsdir = $ { codecs }
$ { if codecs != null then " - - c o d e c s d i r = ${ codecs } " else " " }
- - enable-runtime-cpudetection
- - enable-x11
- - disable-xanim
@ -86,6 +92,6 @@ stdenv.mkDerivation {
description = " A m o v i e p l a y e r t h a t s u p p o r t s m a n y v i d e o f o r m a t s " ;
homepage = " h t t p : / / m p l a y e r h q . h u " ;
license = " G P L " ;
maintainers = [ stdenv . lib . maintainers . eelco ] ;
maintainers = [ stdenv . lib . maintainers . eelco stdenv . lib . maintainers . urkud ] ;
} ;
}