2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv, fetchurl, xlibsWrapper, zlib, libjpeg, imake, gccmakedep, libXmu
|
2015-05-21 18:51:43 +02:00
|
|
|
, libXaw, libXpm, libXp , perl, xauth, fontDirectories, openssh }:
|
2006-07-13 16:54:24 +02:00
|
|
|
|
2021-08-12 21:47:47 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tightvnc";
|
|
|
|
version = "1.3.10";
|
2010-08-26 11:41:22 +02:00
|
|
|
|
2006-07-13 16:54:24 +02:00
|
|
|
src = fetchurl {
|
2021-08-12 21:47:47 +02:00
|
|
|
url = "mirror://sourceforge/vnc-tight/tightvnc-${version}_unixsrc.tar.bz2";
|
2009-03-20 11:49:05 +01:00
|
|
|
sha256 = "f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d";
|
2006-07-13 16:54:24 +02:00
|
|
|
};
|
2009-03-20 11:49:05 +01:00
|
|
|
|
2019-11-24 19:44:01 +01:00
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2009-03-20 11:49:05 +01:00
|
|
|
# for the builder script
|
2018-11-28 19:11:41 +01:00
|
|
|
inherit fontDirectories;
|
2010-08-26 11:41:22 +02:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 02:59:47 +01:00
|
|
|
|
2015-09-15 11:13:22 +02:00
|
|
|
buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
|
2015-05-21 18:51:43 +02:00
|
|
|
libXpm libXp xauth openssh ];
|
2015-05-21 18:51:07 +02:00
|
|
|
|
2018-11-28 19:11:41 +01:00
|
|
|
postPatch = ''
|
2015-05-21 18:51:07 +02:00
|
|
|
fontPath=
|
|
|
|
for i in $fontDirectories; do
|
|
|
|
for j in $(find $i -name fonts.dir); do
|
|
|
|
addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
|
|
|
|
done
|
|
|
|
done
|
2015-05-21 18:51:43 +02:00
|
|
|
|
|
|
|
sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h
|
2015-05-21 18:51:07 +02:00
|
|
|
|
|
|
|
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
|
|
|
|
-e 's@unix/:7100@'$fontPath'@' \
|
|
|
|
-i vncserver
|
|
|
|
|
2018-11-28 19:11:41 +01:00
|
|
|
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
|
2015-05-21 18:51:07 +02:00
|
|
|
sed -i \
|
|
|
|
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
|
|
|
|
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \
|
2018-11-28 19:11:41 +01:00
|
|
|
vncserver
|
2015-05-21 18:51:07 +02:00
|
|
|
'';
|
|
|
|
|
2018-11-28 19:11:41 +01:00
|
|
|
preInstall = ''
|
2015-05-21 18:51:07 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
2018-11-28 19:11:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2015-05-21 18:51:07 +02:00
|
|
|
./vncinstall $out/bin $out/share/man
|
|
|
|
|
2018-11-28 19:11:41 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2015-05-21 18:51:07 +02:00
|
|
|
# fix HTTP client:
|
2018-11-28 19:11:41 +01:00
|
|
|
mkdir -p $out/share/tightvnc
|
|
|
|
cp -r classes $out/share/tightvnc
|
|
|
|
substituteInPlace $out/bin/vncserver \
|
|
|
|
--replace /usr/local/vnc/classes $out/share/tightvnc/classes
|
2015-05-21 18:51:07 +02:00
|
|
|
'';
|
2010-08-26 11:41:22 +02:00
|
|
|
|
|
|
|
meta = {
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://vnc-tight.sourceforge.net/";
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Improved version of VNC";
|
2009-03-20 11:49:05 +01:00
|
|
|
|
2010-08-26 11:41:22 +02:00
|
|
|
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.
|
|
|
|
'';
|
2009-05-17 01:04:06 +02:00
|
|
|
|
2010-08-26 11:41:22 +02:00
|
|
|
maintainers = [];
|
2021-01-15 10:19:50 +01:00
|
|
|
platforms = lib.platforms.unix;
|
2021-12-17 21:32:54 +01: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)
|
2010-08-26 11:41:22 +02:00
|
|
|
};
|
2006-07-13 16:54:24 +02:00
|
|
|
}
|