diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ogre/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/ogre/default.nix | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ogre/default.nix b/nixpkgs/pkgs/development/libraries/ogre/default.nix index f6cd2987aa0d..6749be599a40 100644 --- a/nixpkgs/pkgs/development/libraries/ogre/default.nix +++ b/nixpkgs/pkgs/development/libraries/ogre/default.nix @@ -34,7 +34,16 @@ }: let - common = { version, hash }: stdenv.mkDerivation { + common = { version, hash, imguiVersion, imguiHash }: + let + imgui.src = fetchFromGitHub { + owner = "ocornut"; + repo = "imgui"; + rev = "v${imguiVersion}"; + hash = imguiHash; + }; + in + stdenv.mkDerivation { pname = "ogre"; inherit version; @@ -45,6 +54,12 @@ let inherit hash; }; + postPatch = '' + mkdir -p build + cp -R ${imgui.src} build/imgui-${imguiVersion} + chmod -R u+w build/imgui-${imguiVersion} + ''; + nativeBuildInputs = [ cmake pkg-config @@ -80,11 +95,10 @@ let ]; cmakeFlags = [ - "-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=FALSE" - "-DOGRE_BUILD_DEPENDENCIES=OFF" - "-DOGRE_BUILD_SAMPLES=${toString withSamples}" + (lib.cmakeBool "OGRE_BUILD_DEPENDENCIES" false) + (lib.cmakeBool "OGRE_BUILD_SAMPLES" withSamples) ] ++ lib.optionals stdenv.isDarwin [ - "-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=FALSE" + (lib.cmakeBool "OGRE_BUILD_LIBS_AS_FRAMEWORKS" false) ]; meta = { @@ -98,12 +112,18 @@ let in { ogre_14 = common { - version = "14.1.2"; - hash = "sha256-qPoC5VXA9IC1xiFLrvE7cqCZFkuiEM0OMowUXDlmhF4="; + version = "14.2.2"; + hash = "sha256-85hpujmlM3N81mkiA80xx2C4GsdzWkP61bwdfmw1zt8="; + # https://github.com/OGRECave/ogre/blob/v14.2.2/Components/Overlay/CMakeLists.txt + imguiVersion = "1.90.4"; + imguiHash = "sha256-7+Ay7H97tIO6CUsEyaQv4i9q2FCw98eQUq/KYZyfTAw="; }; ogre_13 = common { version = "13.6.5"; hash = "sha256-8VQqePrvf/fleHijVIqWWfwOusGjVR40IIJ13o+HwaE="; + # https://github.com/OGRECave/ogre/blob/v13.6.5/Components/Overlay/CMakeLists.txt + imguiVersion = "1.87"; + imguiHash = "sha256-H5rqXZFw+2PfVMsYvAK+K+pxxI8HnUC0GlPhooWgEYM="; }; } |