2012-01-30 21:02:08 +00:00
|
|
|
{stdenv, fetchurl, bash, yasm, which, perl}:
|
2010-05-24 21:57:45 +00:00
|
|
|
|
2013-06-11 16:03:48 +00:00
|
|
|
let version = "1.2.0";
|
|
|
|
in
|
2010-05-24 21:57:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-11 16:03:48 +00:00
|
|
|
name = "libvpx-" + version;
|
|
|
|
|
|
|
|
src = fetchurl { # sadly, there's no official tarball for this release
|
|
|
|
url = "ftp://ftp.archlinux.org/other/libvpx/libvpx-${version}.tar.xz";
|
|
|
|
sha256 = "02k9ylswgr2hvjqmg422fa9ggym0g94gzwb14nnckly698rvjc50";
|
2010-05-24 21:57:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -e 's,/bin/bash,${bash}/bin/bash,' -i configure build/make/version.sh \
|
2012-01-30 21:02:08 +00:00
|
|
|
examples/gen_example_code.sh build/make/gen_asm_deps.sh
|
2010-09-01 08:36:09 +00:00
|
|
|
sed -e '/enable linux/d' -i configure
|
2010-05-24 21:57:45 +00:00
|
|
|
'';
|
|
|
|
|
2013-06-11 16:03:48 +00:00
|
|
|
buildInputs = [ yasm which perl ];
|
2010-09-01 08:36:09 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2010-05-24 21:57:45 +00:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2013-07-04 05:03:46 +00:00
|
|
|
substituteInPlace make/configure.sh --replace "-arch x86_64" "-march=x86-64"
|
2010-05-24 21:57:45 +00:00
|
|
|
'';
|
|
|
|
|
2013-06-11 16:03:48 +00:00
|
|
|
configureScript = "../configure";
|
2013-07-04 05:03:46 +00:00
|
|
|
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";
|
2010-09-01 08:36:09 +00:00
|
|
|
|
2010-05-24 21:57:45 +00:00
|
|
|
installPhase = ''
|
|
|
|
make quiet=false DIST_DIR=$out install
|
|
|
|
'';
|
|
|
|
|
2013-07-04 05:03:46 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-24 21:57:45 +00:00
|
|
|
description = "VP8 video encoder";
|
2013-07-04 05:03:46 +00:00
|
|
|
homepage = http://code.google.com/p/webm;
|
2013-07-13 19:54:39 +00:00
|
|
|
license = licenses.bsd3;
|
2013-07-04 05:03:46 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2010-05-24 21:57:45 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|