diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-03-09 22:32:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-09 22:32:31 +0100 |
commit | ab6c0f36cc24633942d3789eee3ba54cc28559b9 (patch) | |
tree | 138f60096aace9350ed67042d766645f1a0fef22 | |
parent | 6bb56dc681dcaa187a914ca0d920453addc080da (diff) | |
parent | 22fdf59f27db7a2170b4369b54df5e223f82232b (diff) | |
download | nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar.gz nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar.bz2 nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar.lz nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar.xz nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.tar.zst nixlib-ab6c0f36cc24633942d3789eee3ba54cc28559b9.zip |
Merge pull request #294520 from wegank/ogre-imgui
ogre: include imgui in overlays
-rw-r--r-- | pkgs/development/libraries/ogre/default.nix | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/pkgs/development/libraries/ogre/default.nix b/pkgs/development/libraries/ogre/default.nix index f6cd2987aa0d..b4fae743ef8a 100644 --- a/pkgs/development/libraries/ogre/default.nix +++ b/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 = { @@ -100,10 +114,16 @@ in ogre_14 = common { version = "14.1.2"; hash = "sha256-qPoC5VXA9IC1xiFLrvE7cqCZFkuiEM0OMowUXDlmhF4="; + # https://github.com/OGRECave/ogre/blob/v14.1.2/Components/Overlay/CMakeLists.txt + imguiVersion = "1.89.8"; + imguiHash = "sha256-pkEm7+ZBYAYgAbMvXhmJyxm6DfyQWkECTXcTHTgfvuo="; }; 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="; }; } |