mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ stdenv, lib, fetchurl, gtk2, libdv, libjpeg, libpng, libX11, pkgconfig, SDL, SDL_gfx
|
|
, withMinimal ? false
|
|
}:
|
|
|
|
# TODO:
|
|
# - make dependencies optional
|
|
# - libpng-apng as alternative to libpng?
|
|
# - libXxf86dga support? checking for XF86DGAQueryExtension in -lXxf86dga... no
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "mjpegtools-2.1.0";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/mjpeg/${name}.tar.gz";
|
|
sha256 = "01y4xpfdvd4zgv6fmcjny9mr1gbfd4y2i4adp657ydw6fqyi8kw6";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
buildInputs = [ libdv libjpeg libpng pkgconfig ]
|
|
++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ];
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optional (!withMinimal) "-I${SDL.dev}/include/SDL";
|
|
|
|
postPatch = ''
|
|
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [ "out" "lib" ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "A suite of programs for processing MPEG or MJPEG video";
|
|
homepage = "http://mjpeg.sourceforge.net/";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ abbradar ];
|
|
};
|
|
}
|