mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
Added CDDA support to MPlayer
svn path=/nixpkgs/trunk/; revision=10978
This commit is contained in:
parent
a463854cd7
commit
003a6d10b5
@ -3,6 +3,9 @@
|
||||
, 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
|
||||
, extraBuildInputs ? []
|
||||
, extraConfigureFlags ? ""
|
||||
}:
|
||||
|
||||
assert alsaSupport -> alsa != null;
|
||||
@ -12,6 +15,7 @@ assert cacaSupport -> libcaca != null;
|
||||
assert xineramaSupport -> libXinerama != null;
|
||||
assert randrSupport -> libXrandr != null;
|
||||
assert dvdnavSupport -> libdvdnav != null;
|
||||
assert cddaSupport -> cdparanoia != null;
|
||||
|
||||
let
|
||||
|
||||
@ -38,7 +42,10 @@ stdenv.mkDerivation {
|
||||
(if xineramaSupport then libXinerama else null)
|
||||
(if randrSupport then libXrandr else null)
|
||||
(if dvdnavSupport then libdvdnav else null)
|
||||
];
|
||||
(if cddaSupport then cdparanoia else null)
|
||||
]
|
||||
++ extraBuildInputs
|
||||
;
|
||||
|
||||
configureFlags = "
|
||||
${if cacaSupport then "--enable-caca" else "--disable-caca"}
|
||||
@ -48,7 +55,9 @@ stdenv.mkDerivation {
|
||||
--enable-runtime-cpudetection
|
||||
--enable-x11 --with-extraincdir=${libX11}/include
|
||||
--disable-xanim
|
||||
";
|
||||
"
|
||||
+ extraConfigureFlags
|
||||
;
|
||||
|
||||
NIX_LDFLAGS = "-lX11 -lXext " # !!! hack, necessary to get libX11/Xext in the RPATH
|
||||
+ (if dvdnavSupport then "-ldvdnav" else "");
|
||||
@ -66,6 +75,7 @@ stdenv.mkDerivation {
|
||||
|
||||
meta = {
|
||||
description = "A movie player that supports many video formats";
|
||||
homepage = "GPL";
|
||||
homepage = "http://mplayerhq.hu";
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
|
@ -23,6 +23,15 @@ rec {
|
||||
else (innerSumArgs f (x // y)));
|
||||
sumArgs = f : innerSumArgs f {};
|
||||
|
||||
# Advanced sumArgs version. Hm, twice as slow, I'm afraid.
|
||||
# composedArgs id (x:x//{a="b";}) (x:x//{b=x.a + "c";}) null;
|
||||
# {a="b" ; b="bc";};
|
||||
innerComposedArgs = f : x : y : (if y==null then (f x)
|
||||
else (if (builtins.isAttrs y) then
|
||||
(innerComposedArgs f (x//y))
|
||||
else (innerComposedArgs f (y x))));
|
||||
composedArgs = f: innerComposedArgs f {};
|
||||
|
||||
# example a = pairMap (x : y : x + y) ["a" "b" "c" "d"];
|
||||
# result: ["ab" "cd"]
|
||||
innerPairMap = acc: f: l:
|
||||
|
@ -5259,8 +5259,9 @@ rec {
|
||||
inherit stdenv fetchurl libao libmad libid3tag zlib;
|
||||
};
|
||||
|
||||
MPlayer = import ../applications/video/MPlayer {
|
||||
inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf libdvdnav;
|
||||
MPlayerFun = lib.composedArgs (import ../applications/video/MPlayer) {
|
||||
inherit fetchurl stdenv freetype x11 zlib libtheora libcaca freefont_ttf libdvdnav
|
||||
cdparanoia;
|
||||
inherit (xlibs) libX11 libXv libXinerama libXrandr;
|
||||
alsaSupport = true;
|
||||
alsa = alsaLib;
|
||||
@ -5268,8 +5269,11 @@ rec {
|
||||
cacaSupport = true;
|
||||
xineramaSupport = true;
|
||||
randrSupport = true;
|
||||
cddaSupport = true;
|
||||
};
|
||||
|
||||
MPlayer = MPlayerFun null;
|
||||
|
||||
# commented out because it's using the new configuration style proposal which is unstable
|
||||
# should be the same as the nix expression above except support for esound :)
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user