2020-12-31 07:48:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libxml2, pcre
|
2017-11-13 22:18:04 +00:00
|
|
|
, darwin}:
|
2014-12-23 17:16:47 +00:00
|
|
|
|
2017-09-16 20:40:02 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "opencollada";
|
2014-12-23 17:16:47 +00:00
|
|
|
|
2018-12-25 08:42:50 +00:00
|
|
|
version = "1.6.68";
|
2014-12-23 17:16:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "OpenCOLLADA";
|
2017-09-16 20:40:02 +01:00
|
|
|
rev = "v${version}";
|
2018-12-25 08:42:50 +00:00
|
|
|
sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w";
|
2014-12-23 17:16:47 +00:00
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]);
|
2014-12-23 17:16:47 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ libxml2 pcre ];
|
|
|
|
|
2018-07-26 15:07:27 +01:00
|
|
|
patchPhase = ''
|
|
|
|
patch -p1 < ${./pcre.patch}
|
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
2017-11-13 22:18:04 +00:00
|
|
|
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
|
|
|
|
--replace math.h cmath
|
|
|
|
'';
|
|
|
|
|
2014-12-23 17:16:47 +00:00
|
|
|
meta = {
|
|
|
|
description = "A library for handling the COLLADA file format";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
|
2021-01-21 17:00:13 +00:00
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.mit;
|
2014-12-23 17:16:47 +00:00
|
|
|
};
|
|
|
|
}
|