diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix index c9cd1909421c..c93959f93d0a 100644 --- a/pkgs/applications/video/MPlayer/default.nix +++ b/pkgs/applications/video/MPlayer/default.nix @@ -7,6 +7,7 @@ , amrnb ? null, amrwb ? null, amrSupport ? false , jackaudioSupport ? false, jackaudio ? null , x264Support ? false, x264 ? null +, xvidSupport ? false, xvidcore ? null , mesa, pkgconfig, unzip }: @@ -63,7 +64,8 @@ stdenv.mkDerivation { ++ stdenv.lib.optional cddaSupport cdparanoia ++ stdenv.lib.optional jackaudioSupport jackaudio ++ stdenv.lib.optionals amrSupport [ amrnb amrwb ] - ++ stdenv.lib.optional x264Support x264; + ++ stdenv.lib.optional x264Support x264 + ++ stdenv.lib.optional xvidSupport xvidcore; configureFlags = '' ${if cacaSupport then "--enable-caca" else "--disable-caca"} diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index 1650c6141f4c..70f7feaaf1a9 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig}: +{stdenv, fetchurl, faad2, libtheora, speex, libvorbis, x264, pkgconfig, xvidcore}: stdenv.mkDerivation { name = "ffmpeg-0.5.1"; @@ -23,9 +23,10 @@ stdenv.mkDerivation { --enable-libvorbis --enable-libspeex --enable-libx264 + --enable-libxvid ''; - buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig]; + buildInputs = [faad2 libtheora speex libvorbis x264 pkgconfig xvidcore]; meta = { homepage = http://www.ffmpeg.org/; diff --git a/pkgs/development/libraries/xvidcore/default.nix b/pkgs/development/libraries/xvidcore/default.nix new file mode 100644 index 000000000000..b02ae2b14e9b --- /dev/null +++ b/pkgs/development/libraries/xvidcore/default.nix @@ -0,0 +1,21 @@ +{stdenv, fetchurl}: + +stdenv.mkDerivation rec { + name = "xvidcore-1.2.2"; + + src = fetchurl { + url = http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.bz2; + sha256 = "04bd1clv90i5pdwh6mz3mskyzmxyx5l2nx7lyyb8nhw9whnn0ap4"; + }; + + preConfigure = '' + cd build/generic + ''; + + meta = { + description = "MPEG-4 video codec for PC"; + homepage = http://www.xvid.org/; + license = "GPLv2+"; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ba372ed42996..fa0f47f370c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3670,7 +3670,7 @@ let }; ffmpeg = import ../development/libraries/ffmpeg { - inherit fetchurl stdenv faad2 libvorbis speex libtheora x264 pkgconfig; + inherit fetchurl stdenv faad2 libvorbis speex libtheora x264 pkgconfig xvidcore; }; fftw = import ../development/libraries/fftw { @@ -5247,6 +5247,10 @@ let ]; }; + xvidcore = import ../development/libraries/xvidcore { + inherit fetchurl stdenv; + }; + zangband = builderDefsPackage (import ../games/zangband) { inherit ncurses flex bison autoconf automake m4 coreutils; }; @@ -7914,7 +7918,7 @@ let MPlayer = import ../applications/video/MPlayer { inherit fetchurl stdenv freetype fontconfig x11 zlib libtheora libcaca libdvdnav - cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio x264; + cdparanoia mesa pkgconfig unzip amrnb amrwb jackaudio x264 xvidcore; inherit (xlibs) libX11 libXv libXinerama libXrandr; alsaSupport = true; alsa = alsaLib; @@ -7925,6 +7929,7 @@ let cddaSupport = true; amrSupport = getConfig [ "MPlayer" "amr" ] false; x264Support = true; + xvidSupport = true; }; MPlayerPlugin = browser: