mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
multivnc: init at 2.8.1
Co-authored-by: Aleksana <alexander.huang.y@gmail.com>
This commit is contained in:
parent
20fff77fcc
commit
c387142f8c
65
pkgs/by-name/mu/multivnc/nixpkgs.patch
Normal file
65
pkgs/by-name/mu/multivnc/nixpkgs.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff -ruZ source/CMakeLists.txt source2/CMakeLists.txt
|
||||
--- source/CMakeLists.txt 1969-12-31 17:00:01.000000000 -0700
|
||||
+++ source2/CMakeLists.txt 2024-11-03 21:24:22.153712626 -0700
|
||||
@@ -12,9 +12,6 @@
|
||||
|
||||
set(WXSERVDISC_INSTALL OFF CACHE BOOL "Set to OFF to not include wxservdisc artifacts in install")
|
||||
add_subdirectory(libwxservdisc/src)
|
||||
-set(LIBVNCSERVER_INSTALL OFF CACHE BOOL "Set to OFF to not include libvncserver artifacts in install")
|
||||
-set(WITH_EXAMPLES OFF CACHE BOOL "Set to OFF to not build libvncserver examples")
|
||||
-add_subdirectory(libvncserver)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
diff -ruZ source/src/CMakeLists.txt source2/src/CMakeLists.txt
|
||||
--- source/src/CMakeLists.txt 1969-12-31 17:00:01.000000000 -0700
|
||||
+++ source2/src/CMakeLists.txt 2024-11-03 21:51:56.015301604 -0700
|
||||
@@ -1,15 +1,17 @@
|
||||
#
|
||||
# dependencies
|
||||
#
|
||||
+include(FindPkgConfig)
|
||||
find_package(wxWidgets 3.0 REQUIRED core base net adv qa)
|
||||
+find_package(LibVNCServer)
|
||||
+pkg_search_module(GTK3 REQUIRED gtk+-3.0)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/
|
||||
${CMAKE_SOURCE_DIR}/libwxservdisc/src
|
||||
- ${CMAKE_SOURCE_DIR}/libvncserver
|
||||
- ${CMAKE_BINARY_DIR}/libvncserver
|
||||
+ ${GTK3_INCXLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
@@ -39,7 +41,7 @@
|
||||
|
||||
add_executable(${executable_name} MACOSX_BUNDLE ${multivnc_SRCS})
|
||||
|
||||
-target_link_libraries(${executable_name} MultiVNCgui ${wxWidgets_LIBRARIES} wxservdisc vncclient)
|
||||
+target_link_libraries(${executable_name} MultiVNCgui ${wxWidgets_LIBRARIES} wxservdisc vncclient ${GTK3_LIBRARIES})
|
||||
|
||||
if(APPLE AND wxWidgets_VERSION_STRING LESS 3.1)
|
||||
set_target_properties(${executable_name} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in)
|
||||
@@ -47,7 +49,6 @@
|
||||
|
||||
|
||||
|
||||
-
|
||||
|
||||
#original Makefile.am contents follow:
|
||||
|
||||
diff -ruZ source/src/VNCConn.h source2/src/VNCConn.h
|
||||
--- source/src/VNCConn.h 1969-12-31 17:00:01.000000000 -0700
|
||||
+++ source2/src/VNCConn.h 2024-11-03 21:28:06.620032553 -0700
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <wx/secretstore.h>
|
||||
#endif
|
||||
#include <wx/msgqueue.h>
|
||||
-#include "rfb/rfbclient.h"
|
||||
+#include <rfb/rfbclient.h>
|
||||
|
||||
|
||||
|
104
pkgs/by-name/mu/multivnc/package.nix
Normal file
104
pkgs/by-name/mu/multivnc/package.nix
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
wxGTK32,
|
||||
gtk3,
|
||||
zlib,
|
||||
libjpeg,
|
||||
libvncserver,
|
||||
cmake,
|
||||
pkg-config,
|
||||
libsysprof-capture,
|
||||
pcre2,
|
||||
util-linux,
|
||||
libselinux,
|
||||
libsepol,
|
||||
libthai,
|
||||
libdatrie,
|
||||
xorg,
|
||||
lerc,
|
||||
libxkbcommon,
|
||||
libepoxy,
|
||||
wrapGAppsHook3,
|
||||
}:
|
||||
|
||||
let
|
||||
# libvncserver does not support multicast. since multivnc is mostly about multicast, it requires a special branch of libvncserver.
|
||||
libvncserver-patched = libvncserver.overrideAttrs {
|
||||
src = fetchFromGitHub {
|
||||
owner = "LibVNC";
|
||||
repo = "libvncserver";
|
||||
rev = "ef3b57438564f2877148a23055f3f0ffce66df11";
|
||||
hash = "sha256-Cg96tsi6h1DX4VSsq1B8DTn0GxnBfoZK2nuxeT/+ca0=";
|
||||
};
|
||||
patches = [ ];
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "MultiVNC";
|
||||
version = "2.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bk138";
|
||||
repo = "multivnc";
|
||||
rev = "89225243412f43ba2903ffeda98af7fe1f8f4975";
|
||||
hash = "sha256-qdF6nUSGaTphoe6T3gTAJTSQwvu+v/g8xfYobFBmGsI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# remove part of vendored libraries that can be provided by Nixpkgs
|
||||
./nixpkgs.patch
|
||||
|
||||
# silences a compiler warning
|
||||
(fetchpatch {
|
||||
url = "https://github.com/bk138/multivnc/commit/002ba7f6b5b88dac3da5c08f99be1f237dcde904.patch";
|
||||
hash = "sha256-Qnk7RrUaw9jsaNTbzYqsH0LU8ivT9xX2jfxrES82ArE=";
|
||||
})
|
||||
];
|
||||
|
||||
# remove submodules we don't need
|
||||
# some submodules can be provided by nixpkgs
|
||||
postPatch = ''
|
||||
rm -rfv libvncserver libsshtunnel libjpeg-turbo libressl libssh2
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
wxGTK32
|
||||
zlib
|
||||
libjpeg
|
||||
libvncserver-patched
|
||||
|
||||
# transitive dependencies
|
||||
libsysprof-capture
|
||||
pcre2
|
||||
util-linux # mount
|
||||
libselinux
|
||||
libsepol
|
||||
libthai
|
||||
libdatrie
|
||||
lerc
|
||||
libxkbcommon
|
||||
libepoxy
|
||||
xorg.libXdmcp
|
||||
xorg.libXtst
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
meta = {
|
||||
mainProgram = "multivnc";
|
||||
description = "Cross-platform Multicast-enabled VNC viewer based on LibVNCClient";
|
||||
homepage = "https://github.com/bk138/multivnc";
|
||||
maintainers = with lib.maintainers; [ rhelmot ];
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user