diff options
author | Marc Weber <marco-oweber@gmx.de> | 2009-09-10 16:58:02 +0000 |
---|---|---|
committer | Marc Weber <marco-oweber@gmx.de> | 2009-09-10 16:58:02 +0000 |
commit | 09920037c00624cd6ce7be46b5d2af0c970516cc (patch) | |
tree | 568b10d88985d23682bfc22d2fdef5aabdf4b0e4 /pkgs/applications/video | |
parent | b441632f92775170f715d63e804370f25e52836d (diff) |
adding mplayer trunk cause the stable source distribution is said to be
outdated
svn path=/nixpkgs/trunk/; revision=17030
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/MPlayer/default.nix | 1 | ||||
-rw-r--r-- | pkgs/applications/video/MPlayer/trunk.nix | 74 |
2 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix index f53cd2911378..415769cc9ce8 100644 --- a/pkgs/applications/video/MPlayer/default.nix +++ b/pkgs/applications/video/MPlayer/default.nix @@ -31,6 +31,7 @@ in stdenv.mkDerivation { name = "MPlayer-1.0rc2-r28450"; + # 1.0_rc2 is outdated according to website - use trunk instead src = fetchurl { url = mirror://gentoo/distfiles/mplayer-1.0_rc2_p28450.tar.bz2; sha256 = "0cbils58mq20nablywgjfpfx2pzjgnhin23sb8k1s5h2rxgvi3vf"; diff --git a/pkgs/applications/video/MPlayer/trunk.nix b/pkgs/applications/video/MPlayer/trunk.nix new file mode 100644 index 000000000000..29fbe04391a2 --- /dev/null +++ b/pkgs/applications/video/MPlayer/trunk.nix @@ -0,0 +1,74 @@ +# the hompepage even recommends using trunk +{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false +, xineramaSupport ? false, randrSupport ? false, dvdnavSupport ? true +, stdenv, fetchurl, x11, freetype, freefont_ttf, zlib +, alsa ? null, libX11, libXv ? null, libtheora ? null, libcaca ? null +, libXinerama ? null, libXrandr ? null, libdvdnav ? null +, cdparanoia ? null, cddaSupport ? true +, mesa, pkgconfig +, sourceByName +}: + +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; + +let + + win32codecs = (import ./win32codecs) { + inherit stdenv fetchurl; + }; + + rp9codecs = (import ./rp9codecs) { + inherit stdenv fetchurl; + }; + +in + +stdenv.mkDerivation { + + name = "mplayer-trunk"; + + src = sourceByName "MPlayer"; + + buildInputs = + [x11 libXv freetype zlib mesa pkgconfig] + ++ 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 + ++ stdenv.lib.optionals dvdnavSupport [libdvdnav libdvdnav.libdvdread] + ++ stdenv.lib.optional cddaSupport cdparanoia; + + configureFlags = '' + ${if cacaSupport then "--enable-caca" else "--disable-caca"} + ${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""} + --win32codecsdir=${win32codecs} + --realcodecsdir=${rp9codecs} + --enable-runtime-cpudetection + --enable-x11 + --disable-xanim + --disable-ivtv + ''; + + NIX_LDFLAGS = "-lX11 -lXext"; + + # Provide a reasonable standard font. Maybe we should symlink here. + postInstall = '' + ensureDir $out/share/mplayer + cp ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mplayer/subfont.ttf + ''; + + meta = { + description = "A movie player that supports many video formats"; + homepage = "http://mplayerhq.hu"; + license = "GPL"; + }; +} |