1 { lib, stdenv, fetchurl, xlibsWrapper, zlib, libjpeg, imake, gccmakedep, libXmu
2 , libXaw, libXpm, libXp , perl, xauth, fontDirectories, openssh }:
4 stdenv.mkDerivation rec {
9 url = "mirror://sourceforge/vnc-tight/tightvnc-${version}_unixsrc.tar.bz2";
10 sha256 = "f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d";
14 ./1.3.10-CVE-2019-15678.patch
15 ./1.3.10-CVE-2019-15679.patch
16 ./1.3.10-CVE-2019-15680.patch
17 ./1.3.10-CVE-2019-8287.patch
20 # for the builder script
21 inherit fontDirectories;
23 hardeningDisable = [ "format" ];
25 buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
26 libXpm libXp xauth openssh ];
30 for i in $fontDirectories; do
31 for j in $(find $i -name fonts.dir); do
32 addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
36 sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
38 sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
39 -e 's@unix/:7100@'$fontPath'@' \
42 sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf
43 sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl
45 -e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
46 -e "s@\<xauth\>@${xauth}/bin/xauth@g" \
52 mkdir -p $out/share/man/man1
58 ./vncinstall $out/bin $out/share/man
65 mkdir -p $out/share/tightvnc
66 cp -r classes $out/share/tightvnc
67 substituteInPlace $out/bin/vncserver \
68 --replace /usr/local/vnc/classes $out/share/tightvnc/classes
72 license = lib.licenses.gpl2Plus;
73 homepage = "http://vnc-tight.sourceforge.net/";
74 description = "Improved version of VNC";
77 TightVNC is an improved version of VNC, the great free
78 remote-desktop tool. The improvements include bandwidth-friendly
79 "tight" encoding, file transfers in the Windows version, enhanced
80 GUI, many bugfixes, and more.
84 platforms = lib.platforms.unix;
86 knownVulnerabilities = [ "CVE-2021-42785" ];
87 # Unfortunately, upstream doesn't maintain the 1.3 branch anymore, and the
88 # new 2.x branch is substantially different (requiring either Windows or Java)