1 { stdenv, lib, fetchurl, gtk2, libdv, libjpeg, libpng, libX11, pkg-config, SDL, SDL_gfx
6 # - make dependencies optional
7 # - libpng-apng as alternative to libpng?
8 # - libXxf86dga support? checking for XF86DGAQueryExtension in -lXxf86dga... no
10 stdenv.mkDerivation rec {
15 url = "mirror://sourceforge/mjpeg/mjpegtools-${version}.tar.gz";
16 sha256 = "sha256-sYBTbX2ZYLBeACOhl7ANyxAJKaSaq3HRnVX0obIQ9Jo=";
19 # Clang 16 defaults to C++17. `std::auto_ptr` has been removed from C++17, and the
20 # `register` type class specifier is no longer allowed.
21 patches = [ ./c++-17-fixes.patch ];
23 hardeningDisable = [ "format" ];
25 nativeBuildInputs = [ pkg-config ];
26 buildInputs = [ libdv libjpeg libpng ]
27 ++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ];
29 env.NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL";
32 sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
35 enableParallelBuilding = true;
37 outputs = [ "out" "lib" ];
40 description = "Suite of programs for processing MPEG or MJPEG video";
41 homepage = "http://mjpeg.sourceforge.net/";
42 license = licenses.gpl2Plus;
43 platforms = platforms.unix;
44 maintainers = with maintainers; [ abbradar ];