nixpkgs-suyu/pkgs/development/libraries/opencollada/default.nix

39 lines
1 KiB
Nix
Raw Normal View History

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 {
pname = "opencollada";
2014-12-23 18:16:47 +01:00
version = "1.6.68";
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}";
sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w";
2014-12-23 18:16:47 +01: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;
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/";
2014-12-23 18:16:47 +01:00
maintainers = [ stdenv.lib.maintainers.eelco ];
2017-11-13 23:18:04 +01:00
platforms = stdenv.lib.platforms.unix;
license = stdenv.lib.licenses.mit;
2014-12-23 18:16:47 +01:00
};
}