input-leap: build on Darwin at 3.0.3

Fixes: #419996
This commit is contained in:
Tom McLaughlin 2025-06-25 10:00:56 -07:00
parent 71bef1d450
commit e8de340ddb
2 changed files with 31 additions and 2 deletions

View File

@ -4,7 +4,7 @@
fetchFromGitHub,
cmake,
withLibei ? true,
withLibei ? !stdenv.hostPlatform.isDarwin,
avahi,
curl,
@ -19,6 +19,7 @@
libei,
libportal,
openssl,
pkgsStatic,
pkg-config,
qtbase,
qttools,
@ -38,6 +39,8 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [ ./macos-no-dmg.patch ];
nativeBuildInputs = [
pkg-config
cmake
@ -45,6 +48,7 @@ stdenv.mkDerivation rec {
wrapQtAppsHook
qttools
];
buildInputs =
[
curl
@ -62,6 +66,9 @@ stdenv.mkDerivation rec {
++ lib.optionals withLibei [
libei
libportal
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
pkgsStatic.openssl
];
cmakeFlags = [
@ -94,6 +101,6 @@ stdenv.mkDerivation rec {
twey
shymega
];
platforms = lib.platforms.linux;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab4e56f2..d01d946d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -289,17 +289,6 @@ endmacro (configure_files)
# Make a bundle for mac os
if (APPLE)
set (CMAKE_INSTALL_RPATH "@loader_path/../Libraries;@loader_path/../Frameworks")
- set(INPUTLEAP_BUNDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dist/macos/bundle)
- set(INPUTLEAP_BUNDLE_DIR ${CMAKE_BINARY_DIR}/bundle)
- set(INPUTLEAP_BUNDLE_APP_DIR ${INPUTLEAP_BUNDLE_DIR}/InputLeap.app)
- set(INPUTLEAP_BUNDLE_BINARY_DIR ${INPUTLEAP_BUNDLE_APP_DIR}/Contents/MacOS)
-
- configure_files(${INPUTLEAP_BUNDLE_SOURCE_DIR} ${INPUTLEAP_BUNDLE_DIR})
-
- add_custom_target(InputLeap_MacOS ALL
- bash build_dist.sh
- DEPENDS input-leap input-leaps input-leapc
- WORKING_DIRECTORY ${INPUTLEAP_BUNDLE_DIR})
elseif (UNIX AND NOT APPLE)
install(FILES doc/input-leapc.1 doc/input-leaps.1 DESTINATION share/man/man1)