2019-02-24 20:39:20 +00:00
|
|
|
{ fetchurl, stdenv, lib
|
2019-11-10 16:44:34 +00:00
|
|
|
, cmake, libGLU, libGL
|
2019-02-24 20:39:20 +00:00
|
|
|
, freetype, freeimage, zziplib, xorgproto, libXrandr
|
|
|
|
, libXaw, freeglut, libXt, libpng, boost, ois
|
2020-12-31 07:48:55 +00:00
|
|
|
, libX11, libXmu, libSM, pkg-config
|
2019-02-24 20:39:20 +00:00
|
|
|
, libXxf86vm, libICE
|
|
|
|
, libXrender
|
|
|
|
, withNvidiaCg ? false, nvidia_cg_toolkit
|
|
|
|
, withSamples ? false }:
|
|
|
|
|
2021-11-09 21:14:04 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ogre";
|
|
|
|
version = "1.10.11";
|
2019-02-24 20:39:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-09 21:14:04 +00:00
|
|
|
url = "https://bitbucket.org/sinbad/ogre/get/v${lib.replaceStrings ["."] ["-"] version}.tar.gz";
|
2019-02-24 20:39:20 +00:00
|
|
|
sha256 = "1zwvlx5dz9nwjazhnrhzb0w8ilpa84r0hrxrmmy69pgr1p1yif5a";
|
|
|
|
};
|
|
|
|
|
2021-11-13 00:32:48 +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>' ""
|
|
|
|
'';
|
|
|
|
|
2019-02-24 20:39:20 +00:00
|
|
|
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 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2019-02-24 20:39:20 +00:00
|
|
|
buildInputs =
|
2020-12-31 07:48:55 +00:00
|
|
|
[ libGLU libGL
|
2019-02-24 20:39:20 +00:00
|
|
|
freetype freeimage zziplib xorgproto libXrandr
|
|
|
|
libXaw freeglut libXt libpng boost ois
|
2020-12-31 07:48:55 +00:00
|
|
|
libX11 libXmu libSM
|
2019-02-24 20:39:20 +00:00
|
|
|
libXxf86vm libICE
|
|
|
|
libXrender
|
|
|
|
] ++ lib.optional withNvidiaCg nvidia_cg_toolkit;
|
|
|
|
|
|
|
|
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;
|
2019-02-24 20:39:20 +00:00
|
|
|
};
|
|
|
|
}
|