3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libvpx/default.nix
Lluís Batlle i Rossell 3faf620e8a Updating libvpx to 1.3.0, and making ffmpeg include vpx
I don't think there is any reason not to have vpx there. It's
part of webm.
2014-01-20 13:47:24 +01:00

47 lines
1.3 KiB
Nix

{stdenv, fetchurl, bash, yasm, which, perl}:
let version = "1.3.0";
in
stdenv.mkDerivation rec {
name = "libvpx-" + version;
src = fetchurl { # sadly, there's no official tarball for this release
url = "http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2";
sha1 = "191b95817aede8c136cc3f3745fb1b8c50e6d5dc";
};
patchPhase = ''
sed -e 's,/bin/bash,${bash}/bin/bash,' -i configure build/make/version.sh \
examples/gen_example_code.sh build/make/gen_asm_deps.sh
sed -e '/enable linux/d' -i configure
'';
buildInputs = [ yasm which perl ];
preConfigure = ''
mkdir -p build
cd build
substituteInPlace make/configure.sh --replace "-arch x86_64" "-march=x86-64"
'';
configureScript = "../configure";
configureFlags =
[ "--disable-install-srcs" "--disable-install-docs" "--disable-examples"
"--enable-vp8" "--enable-runtime-cpu-detect" "--enable-pic" ]
# --enable-shared is only supported on ELF
++ stdenv.lib.optional (!stdenv.isDarwin) "--enable-shared";
installPhase = ''
make quiet=false DIST_DIR=$out install
'';
meta = with stdenv.lib; {
description = "VP8 video encoder";
homepage = http://code.google.com/p/webm;
license = licenses.bsd3;
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix;
};
}