Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
76 lines
1.5 KiB
Nix
76 lines
1.5 KiB
Nix
{
|
|
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";
|
|
version = "2.2.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/mjpeg/mjpegtools-${version}.tar.gz";
|
|
sha256 = "sha256-sYBTbX2ZYLBeACOhl7ANyxAJKaSaq3HRnVX0obIQ9Jo=";
|
|
};
|
|
|
|
patches = [
|
|
# Clang 16 defaults to C++17. `std::auto_ptr` has been removed from C++17,
|
|
# and the `register` type class specifier is no longer allowed.
|
|
./c++-17-fixes.patch
|
|
|
|
# Clang-19 errors out for dead code (in header) which accesses undefined
|
|
# class members
|
|
./remove-subtract-and-union-debug.diff
|
|
];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [
|
|
libdv
|
|
libjpeg
|
|
libpng
|
|
]
|
|
++ lib.optionals (!withMinimal) [
|
|
gtk2
|
|
libX11
|
|
SDL
|
|
SDL_gfx
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString (!withMinimal) "-I${lib.getDev SDL}/include/SDL";
|
|
|
|
postPatch = ''
|
|
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [
|
|
"out"
|
|
"lib"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Suite of programs for processing MPEG or MJPEG video";
|
|
homepage = "http://mjpeg.sourceforge.net/";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.unix;
|
|
maintainers = [ ];
|
|
};
|
|
}
|