diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ogre/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ogre/default.nix | 125 |
1 files changed, 69 insertions, 56 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ogre/default.nix b/nixpkgs/pkgs/development/libraries/ogre/default.nix index ce4951937165..6bac6c5a425b 100644 --- a/nixpkgs/pkgs/development/libraries/ogre/default.nix +++ b/nixpkgs/pkgs/development/libraries/ogre/default.nix @@ -27,72 +27,85 @@ , libXxf86vm , xorgproto # darwin -, Cocoa +, darwin # optional , withNvidiaCg ? false , nvidia_cg_toolkit , withSamples ? false }: -stdenv.mkDerivation rec { - pname = "ogre"; - version = "13.6.4"; +let + common = { version, hash }: stdenv.mkDerivation { + pname = "ogre"; + inherit version; - src = fetchFromGitHub { - owner = "OGRECave"; - repo = "ogre"; - rev = "v${version}"; - hash = "sha256-MSBWCO0s46t+ExWDdmqi16OxmcQXnduhgFt6I4BG1g8="; - }; + src = fetchFromGitHub { + owner = "OGRECave"; + repo = "ogre"; + rev = "v${version}"; + inherit hash; + }; + + nativeBuildInputs = [ + cmake + pkg-config + unzip + ]; - nativeBuildInputs = [ - cmake - pkg-config - unzip - ]; + 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 [ + darwin.apple_sdk.frameworks.Cocoa + ] ++ lib.optionals withNvidiaCg [ + nvidia_cg_toolkit + ]; - 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 - ]; + 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" + ]; - 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 = { + description = "3D Object-Oriented Graphics Rendering Engine"; + homepage = "https://www.ogre3d.org/"; + maintainers = with lib.maintainers; [ raskin wegank ]; + platforms = lib.platforms.unix; + license = lib.licenses.mit; + }; + }; +in +{ + ogre_14 = common { + version = "14.0.1"; + hash = "sha256-jtUm0jy0GsxkGlFdODGodPsuSaQgiE77BORnA6SFViU="; + }; - meta = { - description = "3D Object-Oriented Graphics Rendering Engine"; - homepage = "https://www.ogre3d.org/"; - maintainers = with lib.maintainers; [ raskin wegank ]; - platforms = lib.platforms.unix; - license = lib.licenses.mit; + ogre_13 = common { + version = "13.6.5"; + hash = "sha256-8VQqePrvf/fleHijVIqWWfwOusGjVR40IIJ13o+HwaE="; }; } |