2021-11-01 15:05:17 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, cmake
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, freetype
|
|
|
|
, freeimage
|
|
|
|
, zziplib
|
|
|
|
, xorgproto
|
|
|
|
, libXrandr
|
|
|
|
, libXaw
|
|
|
|
, freeglut
|
|
|
|
, libXt
|
|
|
|
, libpng
|
|
|
|
, boost
|
|
|
|
, ois
|
|
|
|
, libX11
|
|
|
|
, libXmu
|
|
|
|
, libSM
|
|
|
|
, pkg-config
|
|
|
|
, libXxf86vm
|
|
|
|
, libICE
|
2019-02-24 20:39:20 +00:00
|
|
|
, unzip
|
2018-12-31 03:40:47 +00:00
|
|
|
, libXrender
|
2021-05-02 10:53:36 +01:00
|
|
|
, SDL2
|
2021-11-01 15:05:17 +00:00
|
|
|
, withNvidiaCg ? false
|
|
|
|
, nvidia_cg_toolkit
|
|
|
|
, withSamples ? false
|
|
|
|
}:
|
2010-12-22 14:50:13 +00:00
|
|
|
|
2019-02-24 20:39:20 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ogre";
|
2019-07-02 05:24:16 +01:00
|
|
|
version = "1.12.1";
|
2010-12-22 14:50:13 +00:00
|
|
|
|
2021-11-01 15:05:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OGRECave";
|
|
|
|
repo = "ogre";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-FHW0+DZhw6MLlhjh4DRYhA+6vBBXMN9K6GEVoR6P5kM=";
|
2012-04-06 10:07:23 +01:00
|
|
|
};
|
2010-12-22 14:50:13 +00:00
|
|
|
|
2021-11-12 23:52:43 +00:00
|
|
|
# fix for ARM. sys/sysctl.h has moved in later glibcs, and
|
|
|
|
# https://github.com/OGRECave/ogre-next/issues/132 suggests it isn't
|
|
|
|
# needed anyway.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace OgreMain/src/OgrePlatformInformation.cpp \
|
|
|
|
--replace '#include <sys/sysctl.h>' ""
|
|
|
|
'';
|
|
|
|
|
2021-05-02 10:53:36 +01:00
|
|
|
cmakeFlags = [ "-DOGRE_BUILD_DEPENDENCIES=OFF" "-DOGRE_BUILD_SAMPLES=${toString withSamples}" ]
|
2016-04-11 14:48:01 +01:00
|
|
|
++ map (x: "-DOGRE_BUILD_PLUGIN_${x}=on")
|
2021-11-01 15:05:17 +00:00
|
|
|
([ "BSP" "OCTREE" "PCZ" "PFX" ] ++ lib.optional withNvidiaCg "CG")
|
2016-04-11 14:48:01 +01:00
|
|
|
++ map (x: "-DOGRE_BUILD_RENDERSYSTEM_${x}=on") [ "GL" ];
|
2011-03-30 23:08:33 +01:00
|
|
|
|
2010-12-22 14:50:13 +00:00
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake unzip pkg-config ];
|
2012-04-06 10:07:23 +01:00
|
|
|
buildInputs =
|
2021-11-01 15:05:17 +00:00
|
|
|
[
|
|
|
|
cmake
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
freetype
|
|
|
|
freeimage
|
|
|
|
zziplib
|
|
|
|
xorgproto
|
|
|
|
libXrandr
|
|
|
|
libXaw
|
|
|
|
freeglut
|
|
|
|
libXt
|
|
|
|
libpng
|
|
|
|
boost
|
|
|
|
ois
|
|
|
|
libX11
|
|
|
|
libXmu
|
|
|
|
libSM
|
|
|
|
libXxf86vm
|
|
|
|
libICE
|
|
|
|
libXrender
|
|
|
|
SDL2
|
|
|
|
] ++ lib.optional withNvidiaCg nvidia_cg_toolkit;
|
2011-04-09 16:51:00 +01:00
|
|
|
|
2010-12-22 14:50:13 +00:00
|
|
|
meta = {
|
|
|
|
description = "A 3D engine";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.ogre3d.org/";
|
2021-01-21 17:00:13 +00:00
|
|
|
maintainers = [ lib.maintainers.raskin ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.mit;
|
2010-12-22 14:50:13 +00:00
|
|
|
};
|
2012-04-06 10:07:23 +01:00
|
|
|
}
|