2021-01-17 03:51:22 +00:00
|
|
|
{ stdenv, lib, fetchurl, gtk2, libdv, libjpeg, libpng, libX11, pkg-config, SDL, SDL_gfx
|
2019-02-03 15:30:40 +00:00
|
|
|
, withMinimal ? true
|
2016-04-21 14:12:47 +00:00
|
|
|
}:
|
2005-03-18 08:10:35 +00:00
|
|
|
|
2011-06-22 19:01:14 +00:00
|
|
|
# TODO:
|
|
|
|
# - make dependencies optional
|
|
|
|
# - libpng-apng as alternative to libpng?
|
|
|
|
# - libXxf86dga support? checking for XF86DGAQueryExtension in -lXxf86dga... no
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-27 17:35:11 +00:00
|
|
|
pname = "mjpegtools";
|
2021-12-09 13:37:02 +00:00
|
|
|
version = "2.2.1";
|
2016-02-20 22:17:54 +00:00
|
|
|
|
2005-03-18 08:10:35 +00:00
|
|
|
src = fetchurl {
|
2021-07-27 17:35:11 +00:00
|
|
|
url = "mirror://sourceforge/mjpeg/mjpegtools-${version}.tar.gz";
|
2021-12-09 13:37:02 +00:00
|
|
|
sha256 = "sha256-sYBTbX2ZYLBeACOhl7ANyxAJKaSaq3HRnVX0obIQ9Jo=";
|
2005-03-18 08:10:35 +00:00
|
|
|
};
|
2016-02-20 22:17:54 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-05-02 22:58:02 +00:00
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [ libdv libjpeg libpng ]
|
2016-10-01 20:47:19 +00:00
|
|
|
++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ];
|
2016-04-21 14:12:47 +00:00
|
|
|
|
2022-05-10 05:09:28 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL";
|
2016-08-23 12:33:29 +00:00
|
|
|
|
2016-04-21 14:12:47 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
outputs = [ "out" "lib" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-04-21 14:12:47 +00:00
|
|
|
description = "A suite of programs for processing MPEG or MJPEG video";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://mjpeg.sourceforge.net/";
|
2022-02-06 17:11:10 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2016-04-21 14:12:47 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
2005-03-18 08:10:35 +00:00
|
|
|
}
|