1 { lib, stdenv, fetchurl, fetchpatch, cmake, pkg-config, boost, gd, libogg, libtheora, libvorbis }:
3 stdenv.mkDerivation rec {
4 pname = "oggvideotools";
8 url = "mirror://sourceforge/oggvideotools/oggvideotools/oggvideotools-${version}/oggvideotools-${version}.tar.bz2";
9 sha256 = "sha256-2dv3iXt86phhIgnYC5EnRzyX1u5ssNzPwrOP4+jilSM=";
13 # Fix pending upstream inclusion for missing includes:
14 # https://sourceforge.net/p/oggvideotools/bugs/12/
16 name = "gcc-10.patch";
17 url = "https://sourceforge.net/p/oggvideotools/bugs/12/attachment/fix-compile.patch";
18 sha256 = "sha256-mJttoC3jCLM3vmPhlyqh+W0ryp2RjJGIBXd6sJfLJA4=";
21 # Fix pending upstream inclusion for build failure on gcc-12:
22 # https://sourceforge.net/p/oggvideotools/bugs/13/
24 name = "gcc-12.patch";
25 url = "https://sourceforge.net/p/oggvideotools/bugs/13/attachment/fix-gcc-12.patch";
26 sha256 = "sha256-zuDXe86djWkR8SgYZHkuAJJ7Lf2VYsVRBrlEaODtMKE=";
27 # svn patch, rely on prefix added by fetchpatch:
33 # Don't disable optimisations
34 substituteInPlace CMakeLists.txt --replace " -O0 " ""
37 nativeBuildInputs = [ cmake pkg-config ];
39 buildInputs = [ boost gd libogg libtheora libvorbis ];
42 description = "Toolbox for manipulating and creating Ogg video files";
43 homepage = "http://www.streamnik.de/oggvideotools.html";
44 license = licenses.gpl2Only;
46 # Compilation error on Darwin:
47 # error: invalid argument '--std=c++0x' not allowed with 'C'
48 # make[2]: *** [src/libresample/CMakeFiles/resample.dir/build.make:76: src/libresample/CMakeFiles/resample.dir/filterkit.c.o] Error 1
49 broken = stdenv.hostPlatform.isDarwin;