input-leap: build on Darwin at 3.0.3

Fixes: #419996

+31 -2
+9 -2
pkgs/applications/misc/input-leap/default.nix
··· 4 fetchFromGitHub, 5 cmake, 6 7 - withLibei ? true, 8 9 avahi, 10 curl, ··· 19 libei, 20 libportal, 21 openssl, 22 pkg-config, 23 qtbase, 24 qttools, ··· 38 fetchSubmodules = true; 39 }; 40 41 nativeBuildInputs = [ 42 pkg-config 43 cmake ··· 45 wrapQtAppsHook 46 qttools 47 ]; 48 buildInputs = 49 [ 50 curl ··· 62 ++ lib.optionals withLibei [ 63 libei 64 libportal 65 ]; 66 67 cmakeFlags = [ ··· 94 twey 95 shymega 96 ]; 97 - platforms = lib.platforms.linux; 98 }; 99 }
··· 4 fetchFromGitHub, 5 cmake, 6 7 + withLibei ? !stdenv.hostPlatform.isDarwin, 8 9 avahi, 10 curl, ··· 19 libei, 20 libportal, 21 openssl, 22 + pkgsStatic, 23 pkg-config, 24 qtbase, 25 qttools, ··· 39 fetchSubmodules = true; 40 }; 41 42 + patches = [ ./macos-no-dmg.patch ]; 43 + 44 nativeBuildInputs = [ 45 pkg-config 46 cmake ··· 48 wrapQtAppsHook 49 qttools 50 ]; 51 + 52 buildInputs = 53 [ 54 curl ··· 66 ++ lib.optionals withLibei [ 67 libei 68 libportal 69 + ] 70 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 71 + pkgsStatic.openssl 72 ]; 73 74 cmakeFlags = [ ··· 101 twey 102 shymega 103 ]; 104 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 105 }; 106 }
+22
pkgs/applications/misc/input-leap/macos-no-dmg.patch
···
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index ab4e56f2..d01d946d 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -289,17 +289,6 @@ endmacro (configure_files) 6 + # Make a bundle for mac os 7 + if (APPLE) 8 + set (CMAKE_INSTALL_RPATH "@loader_path/../Libraries;@loader_path/../Frameworks") 9 + - set(INPUTLEAP_BUNDLE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dist/macos/bundle) 10 + - set(INPUTLEAP_BUNDLE_DIR ${CMAKE_BINARY_DIR}/bundle) 11 + - set(INPUTLEAP_BUNDLE_APP_DIR ${INPUTLEAP_BUNDLE_DIR}/InputLeap.app) 12 + - set(INPUTLEAP_BUNDLE_BINARY_DIR ${INPUTLEAP_BUNDLE_APP_DIR}/Contents/MacOS) 13 + - 14 + - configure_files(${INPUTLEAP_BUNDLE_SOURCE_DIR} ${INPUTLEAP_BUNDLE_DIR}) 15 + - 16 + - add_custom_target(InputLeap_MacOS ALL 17 + - bash build_dist.sh 18 + - DEPENDS input-leap input-leaps input-leapc 19 + - WORKING_DIRECTORY ${INPUTLEAP_BUNDLE_DIR}) 20 + elseif (UNIX AND NOT APPLE) 21 + install(FILES doc/input-leapc.1 doc/input-leaps.1 DESTINATION share/man/man1) 22 +