nixpkgs/pkgs/development/libraries/xvidcore/default.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

2015-02-17 08:01:10 +01:00
{ stdenv, fetchurl, yasm, autoconf, automake, libtool }:
2015-02-17 08:01:10 +01:00
with stdenv.lib;
stdenv.mkDerivation rec {
2015-02-17 08:01:10 +01:00
name = "xvidcore-${version}";
version = "1.3.3";
src = fetchurl {
url = "http://downloads.xvid.org/downloads/${name}.tar.bz2";
2015-02-17 08:01:10 +01:00
sha256 = "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh";
};
preConfigure = ''
2015-02-17 08:01:10 +01:00
# Configure script is not in the root of the source directory
cd build/generic
2015-02-17 08:01:10 +01:00
'' + optionalString stdenv.isDarwin ''
# Undocumented darwin hack
substituteInPlace configure --replace "-no-cpp-precomp" ""
'';
2015-02-17 08:01:10 +01:00
configureFlags = [ ]
# Undocumented darwin hack (assembly is probably disabled due to an
# issue with nasm, however yasm is now used)
++ optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
2015-02-17 08:01:10 +01:00
nativeBuildInputs = [ ]
++ optional (!stdenv.isDarwin) yasm;
2015-02-17 08:01:10 +01:00
buildInputs = [ ]
# Undocumented darwin hack
++ optionals stdenv.isDarwin [ autoconf automake libtool ];
# Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
# compile ffmpeg (and perhaps other things).
postInstall = optionalString (!stdenv.isDarwin) ''
rm $out/lib/*.a
'';
2015-02-17 08:01:10 +01:00
meta = {
description = "MPEG-4 video codec for PC";
2015-02-17 08:01:10 +01:00
homepage = https://www.xvid.com/;
license = licenses.gpl2;
2015-02-17 08:01:10 +01:00
maintainers = with maintainers; [ codyopel lovek323 ];
platforms = platforms.all;
};
}