nixpkgs/pkgs/by-name/xv/xvidcore/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, yasm, autoconf, automake, libtool }:
stdenv.mkDerivation rec {
pname = "xvidcore";
version = "1.3.7";
2018-01-28 14:29:42 +00:00
src = fetchurl {
url = "https://downloads.xvid.com/downloads/${pname}-${version}.tar.bz2";
sha256 = "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf";
};
preConfigure = ''
2015-02-17 07:01:10 +00:00
# Configure script is not in the root of the source directory
cd build/generic
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
2015-02-17 07:01:10 +00:00
# Undocumented darwin hack
substituteInPlace configure --replace "-no-cpp-precomp" ""
'';
2015-02-17 07:01:10 +00:00
configureFlags = [ ]
# Undocumented darwin hack (assembly is probably disabled due to an
# issue with nasm, however yasm is now used)
++ lib.optional stdenv.hostPlatform.isDarwin "--enable-macosx_module --disable-assembly";
2015-02-17 07:01:10 +00:00
nativeBuildInputs = [ ]
++ lib.optional (!stdenv.hostPlatform.isDarwin) yasm;
2015-02-17 07:01:10 +00:00
buildInputs = [ ]
# Undocumented darwin hack
++ lib.optionals stdenv.hostPlatform.isDarwin [ autoconf automake libtool ];
2015-02-17 07:01:10 +00:00
# Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
# compile ffmpeg (and perhaps other things).
postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
rm $out/lib/*.a
'';
2018-01-28 14:29:42 +00:00
# Dependants of xvidcore don't know to look in bin for dependecies. Link them
# in lib so other depedants of xvidcore can find the dlls.
postFixup = lib.optionalString stdenv.hostPlatform.isMinGW ''
ln -s $out/bin/*.dll $out/lib
'';
meta = with lib; {
description = "MPEG-4 video codec for PC";
2024-02-09 17:43:36 +00:00
homepage = "https://www.xvid.com/";
license = licenses.gpl2;
2015-02-17 07:01:10 +00:00
maintainers = with maintainers; [ codyopel lovek323 ];
2024-02-09 17:43:36 +00:00
platforms = platforms.all;
};
}