Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libxml2, pcre 2, darwin}: 3 4stdenv.mkDerivation rec { 5 pname = "opencollada"; 6 7 version = "1.6.68"; 8 9 src = fetchFromGitHub { 10 owner = "KhronosGroup"; 11 repo = "OpenCOLLADA"; 12 rev = "v${version}"; 13 sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w"; 14 }; 15 16 nativeBuildInputs = [ cmake pkg-config ]; 17 buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]); 18 19 propagatedBuildInputs = [ libxml2 pcre ]; 20 21 patchPhase = '' 22 patch -p1 < ${./pcre.patch} 23 '' + lib.optionalString stdenv.isDarwin '' 24 substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \ 25 --replace math.h cmath 26 ''; 27 28 meta = { 29 description = "A library for handling the COLLADA file format"; 30 homepage = "https://github.com/KhronosGroup/OpenCOLLADA/"; 31 maintainers = [ lib.maintainers.eelco ]; 32 platforms = lib.platforms.unix; 33 license = lib.licenses.mit; 34 }; 35}