nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 47 lines 1.4 kB view raw
1{ stdenv, fetchurl, yasm, autoconf, automake, libtool }: 2 3with stdenv.lib; 4stdenv.mkDerivation rec { 5 name = "xvidcore-${version}"; 6 version = "1.3.5"; 7 8 src = fetchurl { 9 url = "http://downloads.xvid.org/downloads/${name}.tar.bz2"; 10 sha256 = "1d0hy1w9sn6491a3vhyf3vmhq4xkn6yd4ralx1191s6qz5wz483w"; 11 }; 12 13 preConfigure = '' 14 # Configure script is not in the root of the source directory 15 cd build/generic 16 '' + optionalString stdenv.isDarwin '' 17 # Undocumented darwin hack 18 substituteInPlace configure --replace "-no-cpp-precomp" "" 19 ''; 20 21 configureFlags = [ ] 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"; 25 26 nativeBuildInputs = [ ] 27 ++ optional (!stdenv.isDarwin) yasm; 28 29 buildInputs = [ ] 30 # Undocumented darwin hack 31 ++ optionals stdenv.isDarwin [ autoconf automake libtool ]; 32 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) '' 36 rm $out/lib/*.a 37 ''; 38 39 meta = { 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; 45 }; 46} 47