opencollada: fix on darwin

This commit is contained in:
Matthew Bauer 2017-11-13 16:18:04 -06:00
parent 8416c45865
commit 867fb4981d

View File

@ -1,4 +1,5 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, libxml2, pcre }:
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig, libxml2, pcre
, darwin}:
stdenv.mkDerivation rec {
name = "opencollada-${version}";
@ -13,16 +14,22 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake ];
buildInputs = [ cmake ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]);
propagatedBuildInputs = [ libxml2 pcre ];
enableParallelBuilding = true;
patchPhase = lib.optionalString stdenv.isDarwin ''
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
--replace math.h cmath
'';
meta = {
description = "A library for handling the COLLADA file format";
homepage = https://github.com/KhronosGroup/OpenCOLLADA/;
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
};
}