2018-08-12 19:28:08 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, doxygen,
|
2019-11-07 16:36:20 +00:00
|
|
|
libX11, libXinerama, libXrandr, libGLU, libGL,
|
2018-08-12 19:28:08 +01:00
|
|
|
glib, ilmbase, libxml2, pcre, zlib,
|
2020-10-23 19:25:05 +01:00
|
|
|
AGL, Carbon, Cocoa, Foundation,
|
2018-08-12 19:28:08 +01:00
|
|
|
jpegSupport ? true, libjpeg,
|
|
|
|
exrSupport ? false, openexr,
|
|
|
|
gifSupport ? true, giflib,
|
|
|
|
pngSupport ? true, libpng,
|
|
|
|
tiffSupport ? true, libtiff,
|
|
|
|
gdalSupport ? false, gdal,
|
|
|
|
curlSupport ? true, curl,
|
|
|
|
colladaSupport ? false, opencollada,
|
|
|
|
opencascadeSupport ? false, opencascade,
|
2020-06-07 13:39:09 +01:00
|
|
|
ffmpegSupport ? false, ffmpeg_3,
|
2018-08-12 19:28:08 +01:00
|
|
|
nvttSupport ? false, nvidia-texture-tools,
|
|
|
|
freetypeSupport ? true, freetype,
|
|
|
|
svgSupport ? false, librsvg,
|
|
|
|
pdfSupport ? false, poppler,
|
|
|
|
vncSupport ? false, libvncserver,
|
|
|
|
lasSupport ? false, libLAS,
|
|
|
|
luaSupport ? false, lua,
|
|
|
|
sdlSupport ? false, SDL2,
|
|
|
|
restSupport ? false, asio, boost,
|
|
|
|
withApps ? false,
|
|
|
|
withExamples ? false, fltk, wxGTK,
|
2016-09-16 17:18:26 +01:00
|
|
|
}:
|
2011-04-09 17:43:00 +01:00
|
|
|
|
2015-12-29 23:06:34 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-07-27 13:15:58 +01:00
|
|
|
pname = "openscenegraph";
|
|
|
|
version = "3.6.4";
|
2011-04-09 17:43:00 +01:00
|
|
|
|
2018-08-12 19:28:08 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openscenegraph";
|
|
|
|
repo = "OpenSceneGraph";
|
2019-07-27 13:15:58 +01:00
|
|
|
rev = "OpenSceneGraph-${version}";
|
|
|
|
sha256 = "0x8hdbzw0b71j91fzp9cwmy9a7ava8v8wwyj8nxijq942vdx1785";
|
2015-12-29 23:06:34 +00:00
|
|
|
};
|
2011-04-09 17:43:00 +01:00
|
|
|
|
2018-08-12 19:28:08 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake doxygen ];
|
2016-09-16 17:18:26 +01:00
|
|
|
|
2015-12-29 23:06:34 +00:00
|
|
|
buildInputs = [
|
2019-11-07 16:36:20 +00:00
|
|
|
libX11 libXinerama libXrandr libGLU libGL
|
2018-08-12 19:28:08 +01:00
|
|
|
glib ilmbase libxml2 pcre zlib
|
|
|
|
] ++ lib.optional jpegSupport libjpeg
|
|
|
|
++ lib.optional exrSupport openexr
|
|
|
|
++ lib.optional gifSupport giflib
|
|
|
|
++ lib.optional pngSupport libpng
|
|
|
|
++ lib.optional tiffSupport libtiff
|
|
|
|
++ lib.optional gdalSupport gdal
|
|
|
|
++ lib.optional curlSupport curl
|
|
|
|
++ lib.optional colladaSupport opencollada
|
|
|
|
++ lib.optional opencascadeSupport opencascade
|
2020-06-07 13:39:09 +01:00
|
|
|
++ lib.optional ffmpegSupport ffmpeg_3
|
2018-08-12 19:28:08 +01:00
|
|
|
++ lib.optional nvttSupport nvidia-texture-tools
|
|
|
|
++ lib.optional freetypeSupport freetype
|
|
|
|
++ lib.optional svgSupport librsvg
|
|
|
|
++ lib.optional pdfSupport poppler
|
|
|
|
++ lib.optional vncSupport libvncserver
|
|
|
|
++ lib.optional lasSupport libLAS
|
|
|
|
++ lib.optional luaSupport lua
|
|
|
|
++ lib.optional sdlSupport SDL2
|
|
|
|
++ lib.optionals restSupport [ asio boost ]
|
|
|
|
++ lib.optionals withExamples [ fltk wxGTK ]
|
2020-10-23 19:25:05 +01:00
|
|
|
++ lib.optionals stdenv.isDarwin [ AGL Carbon Cocoa Foundation ]
|
2018-08-12 19:28:08 +01:00
|
|
|
;
|
2013-02-23 19:09:11 +00:00
|
|
|
|
2018-08-12 19:28:08 +01:00
|
|
|
cmakeFlags = lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF" ++ lib.optional withExamples "-DBUILD_OSG_EXAMPLES=ON";
|
2011-04-09 17:43:00 +01:00
|
|
|
|
2015-12-29 23:06:34 +00:00
|
|
|
meta = with stdenv.lib; {
|
2011-04-09 17:43:00 +01:00
|
|
|
description = "A 3D graphics toolkit";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.openscenegraph.org/";
|
2019-07-27 13:15:58 +01:00
|
|
|
maintainers = with maintainers; [ aanderse raskin ];
|
2020-10-23 19:25:05 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2011-04-09 17:43:00 +01:00
|
|
|
license = "OpenSceneGraph Public License - free LGPL-based license";
|
|
|
|
};
|
2015-12-29 23:06:34 +00:00
|
|
|
}
|