@ -1,6 +1,6 @@
{ alsaSupport ? true , xvSupport ? true , theoraSupport ? true , cacaSupport ? true
, xineramaSupport ? true , randrSupport ? true , dvdnavSupport ? true
, stdenv , fetchurl , x11 , freetype , fontconfig , zlib
, stdenv , fetchurl , x11 , freetype , fontconfig , zlib , ffmpeg
, alsaLib ? null , libXv ? null , libtheora ? null , libcaca ? null
, libXinerama ? null , libXrandr ? null , libdvdnav ? null
, cdparanoia ? null , cddaSupport ? true
@ -65,15 +65,22 @@ let
in
stdenv . mkDerivation rec {
name = " M P l a y e r - 1 . 0 - p r e 2 0 1 0 1 2 2 7 " ;
name = " m p l a y e r - 2 0 1 1 0 4 2 3 " ;
src = fetchurl {
url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2 ;
sha256 = " 0 q 9 r v j z 3 b y v s 0 q l n b 9 j b n w 3 q s 6 c 3 v d c q a q x m 1 r n q l 8 k q i c 4 4 2 h v 2 " ;
# Old kind of URL:
# url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2;
# Snapshot I took on 20110423
url = http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2 ;
sha256 = " c c 1 b 3 f d a 7 5 b 1 7 2 f 0 2 c 3 f 4 6 5 8 1 c f b 2 c 1 7 f 4 0 9 0 9 9 7 f e 9 3 1 4 a d 0 4 6 e 4 6 4 a 7 6 b 8 5 8 b b " ;
} ;
prePatch = ''
sed - i / ^ _install_strip/d configure
'' ;
buildInputs =
[ freetype zlib pkgconfig ]
[ freetype zlib pkgconfig ffmpeg ]
++ stdenv . lib . optional x11Support [ libX11 libXext mesa ]
++ stdenv . lib . optional alsaSupport alsaLib
++ stdenv . lib . optional xvSupport libXv
@ -94,6 +101,11 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ yasm ] ;
preConfigure = ''
tar xf $ { ffmpeg . src }
mv ffmpeg * ffmpeg
'' ;
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 " " }
@ -103,6 +115,8 @@ stdenv.mkDerivation rec {
$ { if x11Support then " - - e n a b l e - x 1 1 " else " " }
- - disable-xanim
- - disable-ivtv
- - enable-vidix
- - enable-fbdev
'' ;
NIX_LDFLAGS = if x11Support then " - l X 1 1 - l X e x t " else " " ;
@ -115,14 +129,15 @@ stdenv.mkDerivation rec {
'' ;
crossAttrs = {
preConfigure = ''
dontSetConfigureCross = true ;
# Some things (vidix) are nanonote specific. Once someone cares, we can make options from them.
preConfigure = preConfigure + ''
configureFlags = " ` e c h o $ c o n f i g u r e F l a g s |
sed - e ' s/--build [ ^ ] \ + // ' \
- e ' s/--host [ ^ ] \ + // ' \
- e ' s/--codecsdir [ ^ ] \ + // ' \
sed - e ' s/--codecsdir [ ^ ] \ + // ' \
- e ' s/--enable-runtime-cpudetection // ' ` "
configureFlags = " $ c o n f i g u r e F l a g s - - t a r g e t = ${ stdenv . cross . arch } - l i n u x
- - cc = $ crossConfig-gcc - - as = $ crossConfig-as "
- - enable-cross-compile - - cc = $ crossConfig-gcc - - as = $ crossConfig-as
- - disable-vidix-pcidb - - with-vidix-drivers = no - - host-cc = gcc "
'' ;
} ;