2016-09-11 23:24:51 +02:00
|
|
|
{ stdenv, lib, fetchurl, gtk2, libdv, libjpeg, libpng, libX11, pkgconfig, SDL, SDL_gfx
|
2019-02-03 16:30:40 +01:00
|
|
|
, withMinimal ? true
|
2016-04-21 16:12:47 +02:00
|
|
|
}:
|
2005-03-18 09:10:35 +01:00
|
|
|
|
2011-06-22 21:01:14 +02:00
|
|
|
# TODO:
|
|
|
|
# - make dependencies optional
|
|
|
|
# - libpng-apng as alternative to libpng?
|
|
|
|
# - libXxf86dga support? checking for XF86DGAQueryExtension in -lXxf86dga... no
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-02-27 17:45:04 +01:00
|
|
|
name = "mjpegtools-2.1.0";
|
2016-02-20 23:17:54 +01:00
|
|
|
|
2005-03-18 09:10:35 +01:00
|
|
|
src = fetchurl {
|
2011-06-22 21:01:14 +02:00
|
|
|
url = "mirror://sourceforge/mjpeg/${name}.tar.gz";
|
2014-02-27 17:45:04 +01:00
|
|
|
sha256 = "01y4xpfdvd4zgv6fmcjny9mr1gbfd4y2i4adp657ydw6fqyi8kw6";
|
2005-03-18 09:10:35 +01:00
|
|
|
};
|
2016-02-20 23:17:54 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-05-03 00:58:02 +02:00
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ libdv libjpeg libpng ]
|
2016-10-01 22:47:19 +02:00
|
|
|
++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ];
|
2016-04-21 16:12:47 +02:00
|
|
|
|
2016-08-24 18:54:30 +02:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optional (!withMinimal) "-I${SDL.dev}/include/SDL";
|
2016-08-23 14:33:29 +02:00
|
|
|
|
2016-04-21 16:12:47 +02:00
|
|
|
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";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://mjpeg.sourceforge.net/;
|
2016-04-21 16:12:47 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
2005-03-18 09:10:35 +01:00
|
|
|
}
|