push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
gitMinimal,
pkg-config,
lcms2,
tinyxml,
boost,
}:
stdenv.mkDerivation (finalAtts: {
pname = "opencolorio";
version = "1.1.1";
src = fetchFromGitHub {
owner = "imageworks";
repo = "OpenColorIO";
tag = "v${finalAtts.version}";
hash = "sha256-S6N0WK0CQ1wOL77viA6vBNkkW7xLPUClu5+FoljfWYs=";
};
outputs = [
"bin"
"out"
"dev"
];
# TODO: Investigate whether git can be dropped: It's only used to apply patches
nativeBuildInputs = [
cmake
gitMinimal
pkg-config
];
buildInputs = [
lcms2
tinyxml
]
++ lib.optional stdenv.hostPlatform.isDarwin boost;
postPatch = ''
substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
'';
cmakeFlags = [
"-DUSE_EXTERNAL_LCMS=ON"
"-DUSE_EXTERNAL_TINYXML=ON"
# External yaml-cpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
"-DUSE_EXTERNAL_YAML=OFF"
]
++ lib.optional stdenv.hostPlatform.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF"
++ lib.optional (
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64
) "-DCMAKE_OSX_ARCHITECTURES=arm64";
env = lib.optionalAttrs stdenv.cc.isClang {
# yaml-cpp uses std::auto_ptr and std::binary_function which has
# been disabled in clang with libcxx. These flags re-enables these
# features
NIX_CXXSTDLIB_COMPILE = "-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR=1 -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION=1";
};
postInstall = ''
moveToOutput bin "$bin"
moveToOutput cmake "$dev"
mv $out/OpenColorIOConfig.cmake $dev/cmake/
substituteInPlace "$dev/cmake/OpenColorIO-release.cmake" \
--replace "$out/bin" "$bin/bin"
'';
meta = {
homepage = "https://opencolorio.org";
description = "Color management framework for visual effects and animation";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ yzx9 ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,92 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
expat,
yaml-cpp,
pystring,
imath,
minizip-ng,
zlib,
# Only required on Linux
glew,
libglut,
# Python bindings
pythonBindings ? true, # Python bindings
python3Packages,
# Build apps
buildApps ? true, # Utility applications
lcms2,
openexr,
}:
stdenv.mkDerivation rec {
pname = "opencolorio";
version = "2.4.2";
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "OpenColorIO";
rev = "v${version}";
hash = "sha256-+P7T8UZuQEVmsMykSWtUxg0vC7Sr4fQJpovCU5sKtsA=";
};
patches = [
# Fix incorrect line number in test
./line-numbers.patch
];
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
# these tests don't like being run headless on darwin. no builtin
# way of skipping tests so this is what we're reduced to.
substituteInPlace tests/cpu/Config_tests.cpp \
--replace 'OCIO_ADD_TEST(Config, virtual_display)' 'static void _skip_virtual_display()' \
--replace 'OCIO_ADD_TEST(Config, virtual_display_with_active_displays)' 'static void _skip_virtual_display_with_active_displays()'
'';
nativeBuildInputs = [ cmake ] ++ lib.optionals pythonBindings [ python3Packages.python ];
buildInputs = [
expat
yaml-cpp
pystring
imath
minizip-ng
zlib
]
++ lib.optionals stdenv.hostPlatform.isLinux [
glew
libglut
]
++ lib.optionals pythonBindings [
python3Packages.python
python3Packages.pybind11
]
++ lib.optionals buildApps [
lcms2
openexr
];
cmakeFlags = [
"-DOCIO_INSTALL_EXT_PACKAGES=NONE"
"-DOCIO_USE_SSE2NEON=OFF"
# GPU test fails with: libglut (GPU tests): failed to open display ''
"-DOCIO_BUILD_GPU_TESTS=OFF"
"-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include/minizip-ng"
]
++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
# precision issues on non-x86
doCheck = stdenv.hostPlatform.isx86_64;
# Tends to fail otherwise.
enableParallelChecking = false;
meta = with lib; {
homepage = "https://opencolorio.org";
description = "Color management framework for visual effects and animation";
license = licenses.bsd3;
maintainers = [ maintainers.rytone ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/tests/cpu/fileformats/FileFormatCTF_tests.cpp b/tests/cpu/fileformats/FileFormatCTF_tests.cpp
index 7a7ab67b..18c1f55e 100644
--- a/tests/cpu/fileformats/FileFormatCTF_tests.cpp
+++ b/tests/cpu/fileformats/FileFormatCTF_tests.cpp
@@ -1416,7 +1416,7 @@ OCIO_ADD_TEST(FileFormatCTF, difficult_xml_unknown_elements)
"(37): Unrecognized element 'just_ignore' where its parent is 'ProcessList' (8): Unknown element",
"(69): Unrecognized element 'just_ignore' where its parent is 'Description' (66)",
"(70): Unrecognized element 'just_ignore' where its parent is 'just_ignore' (69)",
- "(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (43): 'Matrix' not allowed in this element",
+ "(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (46): 'Matrix' not allowed in this element",
"(76): Unrecognized element 'Description' where its parent is 'Matrix' (75)",
"(77): Unrecognized element 'Array' where its parent is 'Matrix' (75)"
};