2018-01-01 11:22:35 +01:00
|
|
|
{ fetchFromGitHub, stdenv, lib
|
2019-11-10 17:44:34 +01:00
|
|
|
, cmake, libGLU, libGL
|
2018-12-31 04:40:47 +01:00
|
|
|
, freetype, freeimage, zziplib, xorgproto, libXrandr
|
2018-01-01 11:22:35 +01:00
|
|
|
, libXaw, freeglut, libXt, libpng, boost, ois
|
2020-12-31 08:48:55 +01:00
|
|
|
, libX11, libXmu, libSM, pkg-config
|
2018-12-31 04:40:47 +01:00
|
|
|
, libXxf86vm, libICE
|
|
|
|
, libXrender
|
2018-01-01 11:22:35 +01:00
|
|
|
, 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" ];
|
|
|
|
|
|
|
|
|
2020-12-31 08:48:55 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2018-01-01 11:22:35 +01:00
|
|
|
buildInputs =
|
2020-12-31 08:48:55 +01:00
|
|
|
[ libGLU libGL
|
2018-12-31 04:40:47 +01:00
|
|
|
freetype freeimage zziplib xorgproto libXrandr
|
2018-01-01 11:22:35 +01:00
|
|
|
libXaw freeglut libXt libpng boost ois
|
2020-12-31 08:48:55 +01:00
|
|
|
libX11 libXmu libSM
|
2018-12-31 04:40:47 +01:00
|
|
|
libXxf86vm libICE
|
|
|
|
libXrender
|
2018-01-01 11:22:35 +01:00
|
|
|
] ++ lib.optional withNvidiaCg nvidia_cg_toolkit;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A 3D engine";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.ogre3d.org/";
|
2021-01-21 18:00:13 +01:00
|
|
|
maintainers = [ lib.maintainers.raskin ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.mit;
|
2018-01-01 11:22:35 +01:00
|
|
|
};
|
|
|
|
}
|