nixpkgs/pkgs/tools/admin/tightvnc/default.nix

79 lines
2.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, xlibsWrapper, zlib, libjpeg, imake, gccmakedep, libXmu
, libXaw, libXpm, libXp , perl, xauth, fontDirectories, openssh }:
stdenv.mkDerivation {
name = "tightvnc-1.3.10";
src = fetchurl {
url = mirror://sourceforge/vnc-tight/tightvnc-1.3.10_unixsrc.tar.bz2;
sha256 = "f48c70fea08d03744ae18df6b1499976362f16934eda3275cead87baad585c0d";
};
# for the builder script
2018-11-28 18:11:41 +00:00
inherit fontDirectories;
hardeningDisable = [ "format" ];
2015-12-23 01:59:47 +00:00
buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw
libXpm libXp xauth openssh ];
2015-05-21 17:51:07 +01:00
2018-11-28 18:11:41 +00:00
postPatch = ''
2015-05-21 17:51:07 +01:00
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
2015-05-21 17:51:07 +01:00
sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \
-e 's@unix/:7100@'$fontPath'@' \
-i vncserver
2018-11-28 18:11:41 +00: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 17:51:07 +01:00
sed -i \
-e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \
-e "s@\<xauth\>@${xauth}/bin/xauth@g" \
2018-11-28 18:11:41 +00:00
vncserver
2015-05-21 17:51:07 +01:00
'';
2018-11-28 18:11:41 +00:00
preInstall = ''
2015-05-21 17:51:07 +01:00
mkdir -p $out/bin
mkdir -p $out/share/man/man1
2018-11-28 18:11:41 +00:00
'';
installPhase = ''
runHook preInstall
2015-05-21 17:51:07 +01:00
./vncinstall $out/bin $out/share/man
2018-11-28 18:11:41 +00:00
runHook postInstall
'';
postInstall = ''
2015-05-21 17:51:07 +01:00
# fix HTTP client:
2018-11-28 18:11:41 +00: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 17:51:07 +01:00
'';
meta = {
license = stdenv.lib.licenses.gpl2Plus;
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 = [];
platforms = stdenv.lib.platforms.unix;
};
}