2021-02-05 17:12:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, doxygen,
|
2020-04-24 23:36:52 +00:00
|
|
|
libX11, libXinerama, libXrandr, libGLU, libGL,
|
|
|
|
glib, ilmbase, libxml2, pcre, zlib,
|
2020-10-27 00:29:36 +00:00
|
|
|
AGL, Carbon, Cocoa, Foundation,
|
2021-12-06 16:07:01 +00:00
|
|
|
boost,
|
2020-04-24 23:36:52 +00:00
|
|
|
jpegSupport ? true, libjpeg,
|
|
|
|
exrSupport ? false, openexr,
|
|
|
|
gifSupport ? true, giflib,
|
|
|
|
pngSupport ? true, libpng,
|
|
|
|
tiffSupport ? true, libtiff,
|
|
|
|
gdalSupport ? false, gdal,
|
|
|
|
curlSupport ? true, curl,
|
2021-12-06 16:07:01 +00:00
|
|
|
colladaSupport ? false, collada-dom,
|
2020-04-24 23:36:52 +00:00
|
|
|
opencascadeSupport ? false, opencascade,
|
2021-05-03 20:48:10 +00:00
|
|
|
ffmpegSupport ? false, ffmpeg,
|
2020-04-24 23:36:52 +00: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,
|
2021-12-06 16:07:01 +00:00
|
|
|
restSupport ? false, asio,
|
2020-04-24 23:36:52 +00:00
|
|
|
withApps ? false,
|
|
|
|
withExamples ? false, fltk, wxGTK,
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openscenegraph";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "3.6.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openscenegraph";
|
|
|
|
repo = "OpenSceneGraph";
|
|
|
|
rev = "OpenSceneGraph-${version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "00i14h82qg3xzcyd8p02wrarnmby3aiwmz0z43l50byc9f8i05n1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake doxygen ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libX11 libXinerama libXrandr libGLU libGL
|
|
|
|
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
|
2021-12-06 16:07:01 +00:00
|
|
|
++ lib.optional colladaSupport collada-dom
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optional opencascadeSupport opencascade
|
2021-05-03 20:48:10 +00:00
|
|
|
++ lib.optional ffmpegSupport ffmpeg
|
2020-04-24 23:36:52 +00: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
|
2021-12-06 16:07:01 +00:00
|
|
|
++ lib.optional restSupport asio
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optionals withExamples [ fltk wxGTK ]
|
2020-10-27 00:29:36 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ AGL Carbon Cocoa Foundation ]
|
2021-12-06 16:07:01 +00:00
|
|
|
++ lib.optional (restSupport || colladaSupport) boost
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
cmakeFlags = lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF" ++ lib.optional withExamples "-DBUILD_OSG_EXAMPLES=ON";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A 3D graphics toolkit";
|
|
|
|
homepage = "http://www.openscenegraph.org/";
|
|
|
|
maintainers = with maintainers; [ aanderse raskin ];
|
2020-10-27 00:29:36 +00:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = "OpenSceneGraph Public License - free LGPL-based license";
|
|
|
|
};
|
|
|
|
}
|