Files
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

78 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
fetchpatch,
cmake,
pkg-config,
boost,
gd,
libogg,
libtheora,
libvorbis,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "oggvideotools";
version = "0.9.1";
src = fetchurl {
url = "mirror://sourceforge/oggvideotools/oggvideotools/oggvideotools-${finalAttrs.version}/oggvideotools-${finalAttrs.version}.tar.bz2";
hash = "sha256-2dv3iXt86phhIgnYC5EnRzyX1u5ssNzPwrOP4+jilSM=";
};
patches = [
# Fix pending upstream inclusion for missing includes:
# https://sourceforge.net/p/oggvideotools/bugs/12/
(fetchpatch {
name = "gcc-10.patch";
url = "https://sourceforge.net/p/oggvideotools/bugs/12/attachment/fix-compile.patch";
hash = "sha256-mJttoC3jCLM3vmPhlyqh+W0ryp2RjJGIBXd6sJfLJA4=";
})
# Fix pending upstream inclusion for build failure on gcc-12:
# https://sourceforge.net/p/oggvideotools/bugs/13/
(fetchpatch {
name = "gcc-12.patch";
url = "https://sourceforge.net/p/oggvideotools/bugs/13/attachment/fix-gcc-12.patch";
hash = "sha256-zuDXe86djWkR8SgYZHkuAJJ7Lf2VYsVRBrlEaODtMKE=";
# svn patch, rely on prefix added by fetchpatch:
extraPrefix = "";
})
];
postPatch = ''
# Don't disable optimisations
substituteInPlace CMakeLists.txt --replace " -O0 " ""
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
gd
libogg
libtheora
libvorbis
];
cmakeFlags = [
# fix compatibility with CMake (https://cmake.org/cmake/help/v4.0/command/cmake_minimum_required.html)
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "4.0")
];
meta = {
description = "Toolbox for manipulating and creating Ogg video files";
homepage = "https://sourceforge.net/projects/oggvideotools/";
license = lib.licenses.gpl2Only;
maintainers = [ ];
# Compilation error on Darwin:
# error: invalid argument '--std=c++0x' not allowed with 'C'
# make[2]: *** [src/libresample/CMakeFiles/resample.dir/build.make:76: src/libresample/CMakeFiles/resample.dir/filterkit.c.o] Error 1
broken = stdenv.hostPlatform.isDarwin;
};
})