2018-01-01 10:22:35 +00:00
|
|
|
{ fetchFromGitHub, stdenv, lib
|
2018-02-24 13:12:44 +00:00
|
|
|
, cmake, libGLU_combined
|
2018-01-01 10:22:35 +00:00
|
|
|
, freetype, freeimage, zziplib, randrproto, libXrandr
|
|
|
|
, libXaw, freeglut, libXt, libpng, boost, ois
|
|
|
|
, xproto, libX11, libXmu, libSM, pkgconfig
|
|
|
|
, libXxf86vm, xf86vidmodeproto, libICE
|
|
|
|
, renderproto, libXrender
|
|
|
|
, withNvidiaCg ? false, nvidia_cg_toolkit
|
|
|
|
, withSamples ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ogre";
|
|
|
|
version = "1.9.1";
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OGRECave";
|
|
|
|
repo = "ogre";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "11lfgzqaps3728dswrq3cbwk7aicigyz08q4hfyy6ikc6m35r4wg";
|
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ]
|
|
|
|
++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on")
|
|
|
|
([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG")
|
|
|
|
++ map (x: "-DOGRE_BUILD_RENDERSYSTEM_${x}=on") [ "GL" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
buildInputs =
|
2018-02-24 13:12:44 +00:00
|
|
|
[ cmake libGLU_combined
|
2018-01-01 10:22:35 +00:00
|
|
|
freetype freeimage zziplib randrproto libXrandr
|
|
|
|
libXaw freeglut libXt libpng boost ois
|
|
|
|
xproto libX11 libXmu libSM pkgconfig
|
|
|
|
libXxf86vm xf86vidmodeproto libICE
|
|
|
|
renderproto libXrender
|
|
|
|
] ++ lib.optional withNvidiaCg nvidia_cg_toolkit;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 3D engine";
|
2018-03-25 06:04:25 +01:00
|
|
|
homepage = https://www.ogre3d.org/;
|
2018-01-01 10:22:35 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.raskin ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
};
|
|
|
|
}
|