diff --git a/pkgs/applications/video/MPlayer/builder.sh b/pkgs/applications/video/MPlayer/builder.sh index d6dd2d7cb834..2a4a7506ae38 100644 --- a/pkgs/applications/video/MPlayer/builder.sh +++ b/pkgs/applications/video/MPlayer/builder.sh @@ -11,7 +11,9 @@ postUnpack=postUnpack configureFlags="\ --with-win32libdir=$win32codecs \ --with-reallibdir=$win32codecs \ - --enable-runtime-cpudetection" + --enable-runtime-cpudetection \ + --enable-x11 --with-x11incdir=/no-such-dir --with-x11libdir=/no-such-dir + $configureFlags" postInstall() { cp -p ../font-arial-iso-8859-1/font-arial-18-iso-8859-1/* $out/share/mplayer/font diff --git a/pkgs/applications/video/MPlayer/default.nix b/pkgs/applications/video/MPlayer/default.nix index 117294315e70..e04952e02546 100644 --- a/pkgs/applications/video/MPlayer/default.nix +++ b/pkgs/applications/video/MPlayer/default.nix @@ -1,10 +1,12 @@ -{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false +{ alsaSupport ? false, xvSupport ? true, theoraSupport ? false, cacaSupport ? false , stdenv, fetchurl, x11, freetype, zlib -, alsa ? null, libXv ? null, libtheora ? null}: +, alsa ? null, libXv ? null, libtheora ? null, libcaca ? null +}: assert alsaSupport -> alsa != null; assert xvSupport -> libXv != null; assert theoraSupport -> libtheora != null; +assert cacaSupport -> libcaca != null; stdenv.mkDerivation { name = "MPlayer-1.0pre7"; @@ -28,5 +30,8 @@ stdenv.mkDerivation { (if alsaSupport then alsa else null) (if xvSupport then libXv else null) (if theoraSupport then libtheora else null) + (if cacaSupport then libcaca else null) ]; + + configureFlags = if cacaSupport then "--enable-caca" else "--disable-caca"; } diff --git a/pkgs/development/libraries/libcaca/builder.sh b/pkgs/development/libraries/libcaca/builder.sh new file mode 100644 index 000000000000..4c6535a43218 --- /dev/null +++ b/pkgs/development/libraries/libcaca/builder.sh @@ -0,0 +1,6 @@ +source $stdenv/setup + +configureFlags="--disable-x11 --disable-imlib2 --disable-doc" +export NIX_CFLAGS_COMPILE="-I$ncurses/include/ncurses -I$ncurses/include $NIX_CFLAGS_COMPILE" + +genericBuild diff --git a/pkgs/development/libraries/libcaca/default.nix b/pkgs/development/libraries/libcaca/default.nix new file mode 100644 index 000000000000..4c6e80940ad7 --- /dev/null +++ b/pkgs/development/libraries/libcaca/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, ncurses}: + +stdenv.mkDerivation { + name = "libcaca-0.9"; + builder = ./builder.sh; + src = fetchurl { + url = http://sam.zoy.org/libcaca/libcaca-0.9.tar.bz2; + md5 = "c7d5c46206091a9203fcb214abb25e4a"; + }; + inherit ncurses; + propagatedBuildInputs = [ncurses]; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index bd1e65ba841b..a8810079a37e 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -721,6 +721,10 @@ rec { inherit fetchurl stdenv ncurses; }; + libcaca = (import ../development/libraries/libcaca) { + inherit fetchurl stdenv ncurses; + }; + libsigsegv = (import ../development/libraries/libsigsegv) { inherit fetchurl stdenv; }; @@ -1279,11 +1283,12 @@ rec { }; MPlayer = (import ../applications/video/MPlayer) { - inherit fetchurl stdenv freetype x11 zlib libtheora; + inherit fetchurl stdenv freetype x11 zlib libtheora libcaca; inherit (xlibs) libXv; alsaSupport = true; alsa = alsaLib; theoraSupport = true; + cacaSupport = true; }; MPlayerPlugin = (import ../applications/networking/browsers/mozilla-plugins/mplayerplug-in) {