mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 02:03:21 +00:00
Merge pull request #294520 from wegank/ogre-imgui
ogre: include imgui in overlays
This commit is contained in:
commit
ab6c0f36cc
@ -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=";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user