lol

multivnc: init at 2.8.1

Co-authored-by: Aleksana <alexander.huang.y@gmail.com>

+169
+65
pkgs/by-name/mu/multivnc/nixpkgs.patch
··· 1 + diff -ruZ source/CMakeLists.txt source2/CMakeLists.txt 2 + --- source/CMakeLists.txt 1969-12-31 17:00:01.000000000 -0700 3 + +++ source2/CMakeLists.txt 2024-11-03 21:24:22.153712626 -0700 4 + @@ -12,9 +12,6 @@ 5 + 6 + set(WXSERVDISC_INSTALL OFF CACHE BOOL "Set to OFF to not include wxservdisc artifacts in install") 7 + add_subdirectory(libwxservdisc/src) 8 + -set(LIBVNCSERVER_INSTALL OFF CACHE BOOL "Set to OFF to not include libvncserver artifacts in install") 9 + -set(WITH_EXAMPLES OFF CACHE BOOL "Set to OFF to not build libvncserver examples") 10 + -add_subdirectory(libvncserver) 11 + 12 + add_subdirectory(src) 13 + 14 + diff -ruZ source/src/CMakeLists.txt source2/src/CMakeLists.txt 15 + --- source/src/CMakeLists.txt 1969-12-31 17:00:01.000000000 -0700 16 + +++ source2/src/CMakeLists.txt 2024-11-03 21:51:56.015301604 -0700 17 + @@ -1,15 +1,17 @@ 18 + # 19 + # dependencies 20 + # 21 + +include(FindPkgConfig) 22 + find_package(wxWidgets 3.0 REQUIRED core base net adv qa) 23 + +find_package(LibVNCServer) 24 + +pkg_search_module(GTK3 REQUIRED gtk+-3.0) 25 + include(${wxWidgets_USE_FILE}) 26 + include_directories( 27 + ${CMAKE_BINARY_DIR} 28 + ${CMAKE_SOURCE_DIR} 29 + ${CMAKE_SOURCE_DIR}/src/ 30 + ${CMAKE_SOURCE_DIR}/libwxservdisc/src 31 + - ${CMAKE_SOURCE_DIR}/libvncserver 32 + - ${CMAKE_BINARY_DIR}/libvncserver 33 + + ${GTK3_INCXLUDE_DIRS} 34 + ) 35 + 36 + 37 + @@ -39,7 +41,7 @@ 38 + 39 + add_executable(${executable_name} MACOSX_BUNDLE ${multivnc_SRCS}) 40 + 41 + -target_link_libraries(${executable_name} MultiVNCgui ${wxWidgets_LIBRARIES} wxservdisc vncclient) 42 + +target_link_libraries(${executable_name} MultiVNCgui ${wxWidgets_LIBRARIES} wxservdisc vncclient ${GTK3_LIBRARIES}) 43 + 44 + if(APPLE AND wxWidgets_VERSION_STRING LESS 3.1) 45 + set_target_properties(${executable_name} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in) 46 + @@ -47,7 +49,6 @@ 47 + 48 + 49 + 50 + - 51 + 52 + #original Makefile.am contents follow: 53 + 54 + diff -ruZ source/src/VNCConn.h source2/src/VNCConn.h 55 + --- source/src/VNCConn.h 1969-12-31 17:00:01.000000000 -0700 56 + +++ source2/src/VNCConn.h 2024-11-03 21:28:06.620032553 -0700 57 + @@ -37,7 +37,7 @@ 58 + #include <wx/secretstore.h> 59 + #endif 60 + #include <wx/msgqueue.h> 61 + -#include "rfb/rfbclient.h" 62 + +#include <rfb/rfbclient.h> 63 + 64 + 65 +
+104
pkgs/by-name/mu/multivnc/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + wxGTK32, 7 + gtk3, 8 + zlib, 9 + libjpeg, 10 + libvncserver, 11 + cmake, 12 + pkg-config, 13 + libsysprof-capture, 14 + pcre2, 15 + util-linux, 16 + libselinux, 17 + libsepol, 18 + libthai, 19 + libdatrie, 20 + xorg, 21 + lerc, 22 + libxkbcommon, 23 + libepoxy, 24 + wrapGAppsHook3, 25 + }: 26 + 27 + let 28 + # libvncserver does not support multicast. since multivnc is mostly about multicast, it requires a special branch of libvncserver. 29 + libvncserver-patched = libvncserver.overrideAttrs { 30 + src = fetchFromGitHub { 31 + owner = "LibVNC"; 32 + repo = "libvncserver"; 33 + rev = "ef3b57438564f2877148a23055f3f0ffce66df11"; 34 + hash = "sha256-Cg96tsi6h1DX4VSsq1B8DTn0GxnBfoZK2nuxeT/+ca0="; 35 + }; 36 + patches = [ ]; 37 + }; 38 + 39 + in 40 + stdenv.mkDerivation { 41 + pname = "MultiVNC"; 42 + version = "2.8.1"; 43 + 44 + src = fetchFromGitHub { 45 + owner = "bk138"; 46 + repo = "multivnc"; 47 + rev = "89225243412f43ba2903ffeda98af7fe1f8f4975"; 48 + hash = "sha256-qdF6nUSGaTphoe6T3gTAJTSQwvu+v/g8xfYobFBmGsI="; 49 + fetchSubmodules = true; 50 + }; 51 + 52 + patches = [ 53 + # remove part of vendored libraries that can be provided by Nixpkgs 54 + ./nixpkgs.patch 55 + 56 + # silences a compiler warning 57 + (fetchpatch { 58 + url = "https://github.com/bk138/multivnc/commit/002ba7f6b5b88dac3da5c08f99be1f237dcde904.patch"; 59 + hash = "sha256-Qnk7RrUaw9jsaNTbzYqsH0LU8ivT9xX2jfxrES82ArE="; 60 + }) 61 + ]; 62 + 63 + # remove submodules we don't need 64 + # some submodules can be provided by nixpkgs 65 + postPatch = '' 66 + rm -rfv libvncserver libsshtunnel libjpeg-turbo libressl libssh2 67 + ''; 68 + 69 + buildInputs = [ 70 + gtk3 71 + wxGTK32 72 + zlib 73 + libjpeg 74 + libvncserver-patched 75 + 76 + # transitive dependencies 77 + libsysprof-capture 78 + pcre2 79 + util-linux # mount 80 + libselinux 81 + libsepol 82 + libthai 83 + libdatrie 84 + lerc 85 + libxkbcommon 86 + libepoxy 87 + xorg.libXdmcp 88 + xorg.libXtst 89 + ]; 90 + 91 + nativeBuildInputs = [ 92 + cmake 93 + pkg-config 94 + wrapGAppsHook3 95 + ]; 96 + 97 + meta = { 98 + mainProgram = "multivnc"; 99 + description = "Cross-platform Multicast-enabled VNC viewer based on LibVNCClient"; 100 + homepage = "https://github.com/bk138/multivnc"; 101 + maintainers = with lib.maintainers; [ rhelmot ]; 102 + license = lib.licenses.gpl3Plus; 103 + }; 104 + }