2020-04-24 23:36:52 +00:00
|
|
|
{ fetchFromGitHub, stdenv, lib
|
|
|
|
, cmake, libGLU, libGL
|
|
|
|
, freetype, freeimage, zziplib, xorgproto, libXrandr
|
|
|
|
, libXaw, freeglut, libXt, libpng, boost, ois
|
2021-01-15 22:18:51 +00:00
|
|
|
, libX11, libXmu, libSM, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, libXxf86vm, libICE
|
|
|
|
, libXrender
|
|
|
|
, withNvidiaCg ? false, nvidia_cg_toolkit
|
|
|
|
, withSamples ? false }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ogre";
|
|
|
|
version = "1.9.1";
|
|
|
|
|
|
|
|
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" ];
|
|
|
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs =
|
2021-01-15 22:18:51 +00:00
|
|
|
[ libGLU libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
freetype freeimage zziplib xorgproto libXrandr
|
|
|
|
libXaw freeglut libXt libpng boost ois
|
2021-01-15 22:18:51 +00:00
|
|
|
libX11 libXmu libSM
|
2020-04-24 23:36:52 +00:00
|
|
|
libXxf86vm libICE
|
|
|
|
libXrender
|
|
|
|
] ++ lib.optional withNvidiaCg nvidia_cg_toolkit;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 3D engine";
|
|
|
|
homepage = "https://www.ogre3d.org/";
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ lib.maintainers.raskin ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|