nixpkgs/pkgs/tools/video/mjpegtools/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-17 03:51:22 +00:00
{ stdenv, lib, fetchurl, gtk2, libdv, libjpeg, libpng, libX11, pkg-config, SDL, SDL_gfx
, withMinimal ? true
}:
# TODO:
# - make dependencies optional
# - libpng-apng as alternative to libpng?
# - libXxf86dga support? checking for XF86DGAQueryExtension in -lXxf86dga... no
stdenv.mkDerivation rec {
pname = "mjpegtools";
2021-12-09 13:37:02 +00:00
version = "2.2.1";
2016-02-20 22:17:54 +00:00
src = fetchurl {
url = "mirror://sourceforge/mjpeg/mjpegtools-${version}.tar.gz";
2021-12-09 13:37:02 +00:00
sha256 = "sha256-sYBTbX2ZYLBeACOhl7ANyxAJKaSaq3HRnVX0obIQ9Jo=";
};
2016-02-20 22:17:54 +00:00
hardeningDisable = [ "format" ];
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libdv libjpeg libpng ]
++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ];
2019-10-30 00:40:49 +00:00
NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${SDL.dev}/include/SDL";
2016-08-23 13:33:29 +01:00
postPatch = ''
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
'';
enableParallelBuilding = true;
outputs = [ "out" "lib" ];
meta = with 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 ];
};
}