2017-11-13 23:18:04 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, libxml2, pcre
|
|
|
|
, darwin}:
|
2014-12-23 18:16:47 +01:00
|
|
|
|
2017-09-16 21:40:02 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "opencollada-${version}";
|
2014-12-23 18:16:47 +01:00
|
|
|
|
2018-11-19 05:22:11 +01:00
|
|
|
version = "1.6.67";
|
2014-12-23 18:16:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "OpenCOLLADA";
|
2017-09-16 21:40:02 +02:00
|
|
|
rev = "v${version}";
|
2018-11-19 05:22:11 +01:00
|
|
|
sha256 = "0x1h2ns0y05bdvn3i5s600jz6nb8qw8qqgg54njz7833bcy913mj";
|
2014-12-23 18:16:47 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-11-13 23:18:04 +01:00
|
|
|
buildInputs = [ cmake ]
|
|
|
|
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]);
|
2014-12-23 18:16:47 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ libxml2 pcre ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-07-26 16:07:27 +02:00
|
|
|
patchPhase = ''
|
|
|
|
patch -p1 < ${./pcre.patch}
|
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
2017-11-13 23:18:04 +01:00
|
|
|
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
|
|
|
|
--replace math.h cmath
|
|
|
|
'';
|
|
|
|
|
2014-12-23 18:16:47 +01:00
|
|
|
meta = {
|
|
|
|
description = "A library for handling the COLLADA file format";
|
|
|
|
homepage = https://github.com/KhronosGroup/OpenCOLLADA/;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2017-11-13 23:18:04 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2018-08-02 12:06:44 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2014-12-23 18:16:47 +01:00
|
|
|
};
|
|
|
|
}
|