nixpkgs/pkgs/development/libraries/ogre/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
1.5 KiB
Nix
Raw Normal View History

2022-12-04 05:09:46 +00:00
{ lib
2021-11-01 15:05:17 +00:00
, stdenv
2022-12-04 05:09:46 +00:00
, fetchFromGitHub
2021-11-01 15:05:17 +00:00
, cmake
2022-12-04 05:09:46 +00:00
, pkg-config
, unzip
, SDL2
, boost
2021-11-01 15:05:17 +00:00
, freeimage
2022-12-04 05:09:46 +00:00
, freetype
2021-11-01 15:05:17 +00:00
, libpng
, ois
2022-12-04 05:09:46 +00:00
, pugixml
, zziplib
# linux
, freeglut
, libGL
, libGLU
, libICE
, libSM
2021-11-01 15:05:17 +00:00
, libX11
2022-12-04 05:09:46 +00:00
, libXaw
2021-11-01 15:05:17 +00:00
, libXmu
2022-12-04 05:09:46 +00:00
, libXrandr
, libXrender
2022-12-04 05:09:46 +00:00
, libXt
, libXxf86vm
, xorgproto
# darwin
, Cocoa
# optional
2021-11-01 15:05:17 +00:00
, withNvidiaCg ? false
, nvidia_cg_toolkit
, withSamples ? false
}:
stdenv.mkDerivation rec {
pname = "ogre";
2023-04-16 12:15:52 +00:00
version = "13.6.4";
2021-11-01 15:05:17 +00:00
src = fetchFromGitHub {
owner = "OGRECave";
repo = "ogre";
rev = "v${version}";
2023-04-16 12:15:52 +00:00
hash = "sha256-MSBWCO0s46t+ExWDdmqi16OxmcQXnduhgFt6I4BG1g8=";
};
2022-12-04 05:09:46 +00:00
nativeBuildInputs = [
cmake
pkg-config
unzip
];
2022-12-04 05:09:46 +00:00
buildInputs = [
SDL2
boost
freeimage
freetype
libpng
ois
pugixml
zziplib
] ++ lib.optionals stdenv.isLinux [
freeglut
libGL
libGLU
libICE
libSM
libX11
libXaw
libXmu
libXrandr
libXrender
libXt
libXxf86vm
xorgproto
] ++ lib.optionals stdenv.isDarwin [
Cocoa
] ++ lib.optionals withNvidiaCg [
nvidia_cg_toolkit
];
2022-12-04 05:09:46 +00:00
cmakeFlags = [
"-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=FALSE"
"-DOGRE_BUILD_DEPENDENCIES=OFF"
"-DOGRE_BUILD_SAMPLES=${toString withSamples}"
] ++ lib.optionals stdenv.isDarwin [
"-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE"
];
meta = {
2022-12-04 05:09:46 +00:00
description = "3D Object-Oriented Graphics Rendering Engine";
homepage = "https://www.ogre3d.org/";
2022-12-04 05:09:46 +00:00
maintainers = with lib.maintainers; [ raskin wegank ];
platforms = lib.platforms.unix;
license = lib.licenses.mit;
};
}