Files
nixpkgs/pkgs/by-name/op/opencollada/package.nix
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.0 KiB
Nix

{
cmake,
dos2unix,
fetchFromGitHub,
fetchpatch,
lib,
libxml2,
pcre,
pkg-config,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "opencollada";
version = "1.6.68";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "OpenCOLLADA";
rev = "v${version}";
sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w";
};
# Fix freaky dos-style CLRF things
prePatch = ''
dos2unix CMakeLists.txt
'';
patches = [
# fix build with gcc 13
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-gcc13.patch?id=b76590f9fb8615da3da9d783ad841c0e3881a27b";
hash = "sha256-oi/QhNPRnuSHfJJ071/3wnjLeg4zZUL6NwSGYvgkb/k=";
})
# fix pcre
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.63-pcre-fix.patch";
hash = "sha256-igrwgmNwDKYwj6xWvWrryT5ARWJpztVmlQ0HCLQn5+Q=";
})
# fix build with cmake 4
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-cmake4.patch?id=42f1e0614c4d056841fdc162c29a04ff0e910139";
hash = "sha256-gbF6PPalJGgXGu4W7EptYeDq8418JdGH50LIqKqGKX0=";
})
];
postPatch = ''
# Drop blanket -Werror as it tends to fail on newer toolchain for
# minor warnings. In this case it was gcc-13 build failure.
substituteInPlace DAEValidator/CMakeLists.txt --replace-fail ' -Werror"' '"'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
--replace math.h cmath
'';
nativeBuildInputs = [
cmake
pkg-config
dos2unix
];
propagatedBuildInputs = [
libxml2
pcre
];
meta = {
description = "Library for handling the COLLADA file format";
homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
maintainers = [ ];
platforms = lib.platforms.unix;
license = lib.licenses.mit;
};
}