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