Merge pull request #261258 from yu-re-ka/kemai

kemai: wayland support, set mainProgram, update
This commit is contained in:
Janik 2023-11-10 23:35:23 +01:00 committed by GitHub
commit f11ce25baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 42 deletions

View File

@ -1,38 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce78a9d..3cd51e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,18 +8,21 @@ list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
# Common configuration
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-# Setup Conan
-if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
- message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
- file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
- "${CMAKE_BINARY_DIR}/conan.cmake"
- TLS_VERIFY ON)
-endif()
-include(${CMAKE_BINARY_DIR}/conan.cmake)
-
-conan_cmake_autodetect(settings)
-conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
+set(USE_CONAN ON CACHE BOOL "Use conan for dependency managment")
+
+if(USE_CONAN)
+ # Setup Conan
+ if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
+ message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
+ file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/0.18.1/conan.cmake"
+ "${CMAKE_BINARY_DIR}/conan.cmake"
+ TLS_VERIFY ON)
+ endif()
+ include(${CMAKE_BINARY_DIR}/conan.cmake)
+
+ conan_cmake_autodetect(settings)
+ conan_cmake_install(PATH_OR_REFERENCE ${CMAKE_SOURCE_DIR} BUILD missing SETTINGS ${settings})
+endif ()
# Setup Qt
set(CMAKE_AUTOMOC ON)

View File

@ -1,13 +1,16 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, magic-enum
, range-v3
, spdlog
, qtbase
, qtconnectivity
, qttools
, qtlanguageserver
, qtwayland
, wrapQtAppsHook
, libXScrnSaver
, nix-update-script
@ -15,15 +18,24 @@
stdenv.mkDerivation rec {
pname = "kemai";
version = "0.9.2";
version = "0.10.0";
src = fetchFromGitHub {
owner = "AlexandrePTJ";
repo = "kemai";
rev = version;
hash = "sha256-PDjNO2iMPK0J3TSHVZ/DW3W0GkdB8yNZYoTGEd2snac=";
hash = "sha256-wclBAgeDyAIw/nGF6lzIwbwdoZMBTu+tjxsnIxIkODM=";
};
patches = [
# Backport the fix for an issue where LICENSE.txt ends up in /bin
# Remove in next release
(fetchpatch {
url = "https://github.com/AlexandrePTJ/kemai/commit/e279679dd7308efebe004252d168d7308f3b99ce.patch";
hash = "sha256-5cmRRMVATf4ul4HhaQKiE0yTN2qd+MfNFQzGTLLpOyg=";
})
];
buildInputs = [
qtbase
qtconnectivity
@ -31,10 +43,14 @@ stdenv.mkDerivation rec {
qtlanguageserver
libXScrnSaver
magic-enum
range-v3
spdlog
] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
cmakeFlags = [
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
"-DFETCHCONTENT_QUIET=OFF"
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
];
cmakeFlags = [ "-DUSE_CONAN=OFF" ];
patches = [ ./000-cmake-disable-conan.diff ];
nativeBuildInputs = [ cmake wrapQtAppsHook ];
@ -48,5 +64,7 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ poelzi ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
mainProgram = "Kemai";
};
}