mcpelauncher-{client,ui-qt}: init at 1.1.2 (#365142)

authored by Aleksana and committed by GitHub 6096cd59 45f735bb

+242
+6
maintainers/maintainer-list.nix
··· 15126 15126 githubId = 92527083; 15127 15127 name = "Morten Munk"; 15128 15128 }; 15129 + morxemplum = { 15130 + email = "morxemplum@outlook.com"; 15131 + github = "Morxemplum"; 15132 + githubId = 44561540; 15133 + name = "Synth Morxemplum"; 15134 + }; 15129 15135 MostAwesomeDude = { 15130 15136 email = "cds@corbinsimpson.com"; 15131 15137 github = "MostAwesomeDude";
+25
pkgs/by-name/mc/mcpelauncher-client/dont_download_glfw_client.patch
··· 1 + diff --git a/ext/glfw.cmake b/ext/glfw.cmake 2 + index 5487f32..feeb89f 100644 3 + --- a/ext/glfw.cmake 4 + +++ b/ext/glfw.cmake 5 + @@ -1,18 +1,2 @@ 6 + -include(FetchContent) 7 + - 8 + -set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) 9 + -set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) 10 + -set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) 11 + -set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) 12 + - 13 + -FetchContent_Declare( 14 + - glfw3_ext 15 + - URL "https://github.com/minecraft-linux/glfw/archive/fce9121962bc0a21c39e2d6f8e08bad30c566c72.zip" 16 + -) 17 + - 18 + -FetchContent_GetProperties(glfw3_ext) 19 + -if(NOT glfw3_ext_POPULATED) 20 + - FetchContent_Populate(glfw3_ext) 21 + - add_subdirectory(${glfw3_ext_SOURCE_DIR} ${glfw3_ext_BINARY_DIR}) 22 + -endif() 23 + +find_package(glfw3 REQUIRED) 24 + add_library(glfw3 ALIAS glfw) 25 + \ No newline at end of file
+125
pkgs/by-name/mc/mcpelauncher-client/package.nix
··· 1 + { 2 + lib, 3 + clangStdenv, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + cmake, 7 + pkg-config, 8 + openssl, 9 + zlib, 10 + libpng, 11 + libglvnd, 12 + xorg, 13 + libevdev, 14 + curl, 15 + pulseaudio, 16 + qt6, 17 + glfw, 18 + withQtWebview ? true, 19 + withQtErrorWindow ? true, 20 + fetchzip, 21 + }: 22 + 23 + # gcc doesn't support __has_feature 24 + clangStdenv.mkDerivation (finalAttrs: { 25 + pname = "mcpelauncher-client"; 26 + version = "1.1.2-qt6"; 27 + 28 + # NOTE: check mcpelauncher-ui-qt when updating 29 + src = fetchFromGitHub { 30 + owner = "minecraft-linux"; 31 + repo = "mcpelauncher-manifest"; 32 + tag = "v${finalAttrs.version}"; 33 + fetchSubmodules = true; 34 + hash = "sha256-PmCq6Zgtp17UV0kIbNouFwj/DMiTqwE31+tTb2LUp5o="; 35 + }; 36 + 37 + patches = [ 38 + ./dont_download_glfw_client.patch 39 + # These are upcoming changes that have been merged upstream. Once these get in a release, remove these patches. 40 + (fetchpatch { 41 + url = "https://github.com/minecraft-linux/game-window/commit/feea8c0e0720eea7093ed95745c17f36d6c40671.diff"; 42 + hash = "sha256-u4uveoKwwklEooT+i+M9kZ0PshjL1IfWhlltmulsQJo="; 43 + stripLen = 1; 44 + extraPrefix = "game-window/"; 45 + }) 46 + (fetchpatch { 47 + url = "https://github.com/minecraft-linux/mcpelauncher-client/commit/db9c31e46d7367867c85a0d0aba42c8144cdf795.diff"; 48 + hash = "sha256-za/9oZYwKCYyZ1BXQ/zeEjRy81B1NpTlPHEfWAOtzHk="; 49 + stripLen = 1; 50 + extraPrefix = "mcpelauncher-client/"; 51 + }) 52 + ]; 53 + 54 + # FORTIFY_SOURCE breaks libc_shim and the project will fail to compile 55 + hardeningDisable = [ "fortify" ]; 56 + 57 + nativeBuildInputs = 58 + [ 59 + cmake 60 + pkg-config 61 + ] 62 + ++ lib.optionals (withQtWebview || withQtErrorWindow) [ 63 + qt6.wrapQtAppsHook 64 + ]; 65 + 66 + buildInputs = 67 + [ 68 + openssl 69 + zlib 70 + libpng 71 + libglvnd 72 + xorg.libX11 73 + xorg.libXi 74 + xorg.libXtst 75 + libevdev 76 + curl 77 + pulseaudio 78 + glfw 79 + ] 80 + ++ lib.optionals (withQtWebview || withQtErrorWindow) [ 81 + qt6.qtbase 82 + qt6.qttools 83 + qt6.qtwayland 84 + ] 85 + ++ lib.optionals withQtWebview [ 86 + qt6.qtwebengine 87 + ]; 88 + 89 + cmakeFlags = [ 90 + (lib.cmakeBool "FETCHCONTENT_FULLY_DISCONNECTED" true) 91 + (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_NLOHMANN_JSON_EXT" ( 92 + toString (fetchzip { 93 + url = "https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip"; 94 + hash = "sha256-h8czZ4f5vZqvHkDVQawrQdUeQnWxewu4OONisqlrmmM="; 95 + stripRoot = false; 96 + }) 97 + )) 98 + (lib.cmakeBool "USE_OWN_CURL" false) 99 + (lib.cmakeBool "ENABLE_DEV_PATHS" false) 100 + (lib.cmakeFeature "GAMEWINDOW_SYSTEM" "GLFW") 101 + (lib.cmakeBool "USE_SDL3_AUDIO" false) 102 + (lib.cmakeBool "BUILD_WEBVIEW" withQtWebview) 103 + (lib.cmakeBool "XAL_WEBVIEW_USE_CLI" (!withQtWebview)) 104 + (lib.cmakeBool "XAL_WEBVIEW_USE_QT" withQtWebview) 105 + (lib.cmakeBool "ENABLE_QT_ERROR_UI" withQtErrorWindow) 106 + ]; 107 + 108 + meta = { 109 + description = "Unofficial Minecraft Bedrock Edition launcher with CLI"; 110 + homepage = "https://minecraft-linux.github.io"; 111 + license = lib.licenses.gpl3Plus; 112 + maintainers = with lib.maintainers; [ 113 + aleksana 114 + morxemplum 115 + ]; 116 + mainProgram = "mcpelauncher-client"; 117 + platforms = lib.platforms.unix; 118 + # Minecraft Bedrock Edition is raising minimal OpenGL version to OpenGL ES 3.1 119 + # which is currently not supported on macOS. 120 + # https://github.com/minecraft-linux/mcpelauncher-manifest/issues/1042 121 + # https://help.minecraft.net/hc/en-us/articles/30298767427597-Upcoming-OS-Sunset-Announcements-in-Minecraft 122 + # The program is also not tested on darwin. Any help from darwin users are welcomed. 123 + badPlatforms = lib.platforms.darwin; 124 + }; 125 + })
+24
pkgs/by-name/mc/mcpelauncher-ui-qt/dont_download_glfw_ui.patch
··· 1 + diff -urB mcpelauncher-ui/mcpelauncher-ui-qt/ext/glfw.cmake mcpelauncher-ui-b/mcpelauncher-ui-qt/ext/glfw.cmake 2 + --- mcpelauncher-ui/mcpelauncher-ui-qt/ext/glfw.cmake 2024-11-28 21:12:36.794926431 -0700 3 + +++ mcpelauncher-ui-b/mcpelauncher-ui-qt/ext/glfw.cmake 2024-12-03 15:04:28.466197081 -0700 4 + @@ -1,19 +1,2 @@ 5 + -include(FetchContent) 6 + - 7 + -set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) 8 + -set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) 9 + -set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) 10 + -set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) 11 + -set(GLFW_BUILD_WAYLAND OFF CACHE BOOL "" FORCE) 12 + - 13 + -FetchContent_Declare( 14 + - glfw3_ext 15 + - URL "https://github.com/glfw/glfw/archive/master.zip" 16 + -) 17 + - 18 + -FetchContent_GetProperties(glfw3_ext) 19 + -if(NOT glfw3_ext_POPULATED) 20 + - FetchContent_Populate(glfw3_ext) 21 + - add_subdirectory(${glfw3_ext_SOURCE_DIR} ${glfw3_ext_BINARY_DIR}) 22 + -endif() 23 + +find_package(glfw3 REQUIRED) 24 + add_library(glfw3 ALIAS glfw)
+62
pkgs/by-name/mc/mcpelauncher-ui-qt/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + mcpelauncher-client, 5 + fetchFromGitHub, 6 + cmake, 7 + pkg-config, 8 + zlib, 9 + libzip, 10 + curl, 11 + protobuf, 12 + qt6, 13 + glfw, 14 + }: 15 + 16 + stdenv.mkDerivation (finalAttrs: { 17 + pname = "mcpelauncher-ui-qt"; 18 + inherit (mcpelauncher-client) version; 19 + 20 + src = fetchFromGitHub { 21 + owner = "minecraft-linux"; 22 + repo = "mcpelauncher-ui-manifest"; 23 + tag = "v${finalAttrs.version}"; 24 + fetchSubmodules = true; 25 + hash = "sha256-R9wE1lS7x1IIPgVahXjF5Yg2ca+GsiQuF41pWf2edXY="; 26 + }; 27 + 28 + patches = [ 29 + ./dont_download_glfw_ui.patch 30 + ]; 31 + 32 + nativeBuildInputs = [ 33 + cmake 34 + pkg-config 35 + qt6.wrapQtAppsHook 36 + ]; 37 + 38 + buildInputs = [ 39 + zlib 40 + libzip 41 + curl 42 + protobuf 43 + qt6.qtwebengine 44 + qt6.qtsvg 45 + qt6.qtwayland 46 + glfw 47 + ]; 48 + 49 + # the program refuses to start when QT_STYLE_OVERRIDE is set 50 + # https://github.com/minecraft-linux/mcpelauncher-ui-qt/issues/25 51 + preFixup = '' 52 + qtWrapperArgs+=( 53 + --prefix PATH : ${lib.makeBinPath [ mcpelauncher-client ]} 54 + --unset QT_STYLE_OVERRIDE 55 + ) 56 + ''; 57 + 58 + meta = mcpelauncher-client.meta // { 59 + description = "Unofficial Minecraft Bedrock Edition launcher with GUI"; 60 + mainProgram = "mcpelauncher-ui-qt"; 61 + }; 62 + })