1 { lib, stdenv, fetchurl, yasm, autoconf, automake, libtool }:
4 stdenv.mkDerivation rec {
9 url = "https://downloads.xvid.com/downloads/${pname}-${version}.tar.bz2";
10 sha256 = "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf";
14 # Configure script is not in the root of the source directory
16 '' + optionalString stdenv.isDarwin ''
17 # Undocumented darwin hack
18 substituteInPlace configure --replace "-no-cpp-precomp" ""
22 # Undocumented darwin hack (assembly is probably disabled due to an
23 # issue with nasm, however yasm is now used)
24 ++ optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
26 nativeBuildInputs = [ ]
27 ++ optional (!stdenv.isDarwin) yasm;
30 # Undocumented darwin hack
31 ++ optionals stdenv.isDarwin [ autoconf automake libtool ];
33 # Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
34 # compile ffmpeg (and perhaps other things).
35 postInstall = optionalString (!stdenv.isDarwin) ''
40 description = "MPEG-4 video codec for PC";
41 homepage = "https://www.xvid.com/";
42 license = licenses.gpl2;
43 maintainers = with maintainers; [ codyopel lovek323 ];
44 platforms = platforms.all;