2022-12-02 08:20:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, zlib
|
|
|
|
, libjpeg
|
|
|
|
, imake
|
|
|
|
, gccmakedep
|
|
|
|
, libXaw
|
|
|
|
, libXext
|
|
|
|
, libXmu
|
|
|
|
, libXp
|
|
|
|
, libXpm
|
|
|
|
, perl
|
|
|
|
, xauth
|
|
|
|
, fontDirectories
|
|
|
|
, openssh
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tightvnc";
|
|
|
|
version = "1.3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-18 13:19:15 +00:00
|
|
|
url = "mirror://sourceforge/vnc-tight/tightvnc-${version}_unixsrc.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./1.3.10-CVE-2019-15678.patch
|
|
|
|
./1.3.10-CVE-2019-15679.patch
|
|
|
|
./1.3.10-CVE-2019-15680.patch
|
|
|
|
./1.3.10-CVE-2019-8287.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
# for the builder script
|
|
|
|
inherit fontDirectories;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
libjpeg
|
|
|
|
imake
|
|
|
|
gccmakedep
|
|
|
|
libXaw
|
|
|
|
libXext
|
|
|
|
libXmu
|
|
|
|
libXp
|
|
|
|
libXpm
|
|
|
|
xauth
|
|
|
|
openssh
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
fontPath=
|
|
|
|
for i in $fontDirectories; do
|
|
|
|
for j in $(find $i -name fonts.dir); do
|
|
|
|
addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
|
|
|
|
|
|
|
|
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
|
|
|
|
-e 's@unix/:7100@'$fontPath'@' \
|
|
|
|
-i vncserver
|
|
|
|
|
|
|
|
sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf
|
|
|
|
sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl
|
|
|
|
sed -i \
|
|
|
|
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
|
|
|
|
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \
|
|
|
|
vncserver
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
./vncinstall $out/bin $out/share/man
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# fix HTTP client:
|
|
|
|
mkdir -p $out/share/tightvnc
|
|
|
|
cp -r classes $out/share/tightvnc
|
|
|
|
substituteInPlace $out/bin/vncserver \
|
|
|
|
--replace /usr/local/vnc/classes $out/share/tightvnc/classes
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://vnc-tight.sourceforge.net/";
|
|
|
|
description = "Improved version of VNC";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
TightVNC is an improved version of VNC, the great free
|
|
|
|
remote-desktop tool. The improvements include bandwidth-friendly
|
|
|
|
"tight" encoding, file transfers in the Windows version, enhanced
|
|
|
|
GUI, many bugfixes, and more.
|
|
|
|
'';
|
|
|
|
|
|
|
|
maintainers = [];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
knownVulnerabilities = [ "CVE-2021-42785" ];
|
|
|
|
# Unfortunately, upstream doesn't maintain the 1.3 branch anymore, and the
|
|
|
|
# new 2.x branch is substantially different (requiring either Windows or Java)
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|