2017-05-07 10:37:42 +02:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, xorg, xkeyboard_config, zlib
|
|
|
|
, libjpeg_turbo, pixman, fltk
|
|
|
|
, fontDirectories
|
|
|
|
, cmake, gettext, libtool
|
|
|
|
, glproto, mesa_glu
|
|
|
|
, gnutls, pam, nettle
|
|
|
|
, xterm }:
|
2011-12-03 10:29:38 +01:00
|
|
|
|
2010-07-13 00:15:50 +02:00
|
|
|
with stdenv.lib;
|
2010-07-13 00:15:36 +02:00
|
|
|
|
2011-11-10 20:05:43 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-05-07 10:37:42 +02:00
|
|
|
version = "1.8.0pre20170419";
|
2016-01-14 07:31:30 +01:00
|
|
|
name = "tigervnc-${version}";
|
2013-01-28 15:53:51 +01:00
|
|
|
|
2017-02-03 13:34:25 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TigerVNC";
|
|
|
|
repo = "tigervnc";
|
2017-05-07 10:37:42 +02:00
|
|
|
sha256 = "1y3fn7dwlkm7ilqn8bwyqj3bw7s7clnv7d4jml4wyvfihzz9j90b";
|
|
|
|
rev = "v1.7.90";
|
2010-07-13 00:15:36 +02:00
|
|
|
};
|
|
|
|
|
2010-07-13 19:57:13 +02:00
|
|
|
inherit fontDirectories;
|
|
|
|
|
2010-07-13 00:15:50 +02:00
|
|
|
patchPhase = ''
|
2017-05-07 10:37:42 +02:00
|
|
|
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${xkeyboard_config}/etc/X11/xkb";' unix/vncserver
|
2010-07-13 19:57:13 +02:00
|
|
|
fontPath=
|
|
|
|
for i in $fontDirectories; do
|
|
|
|
for j in $(find $i -name fonts.dir); do
|
|
|
|
addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j)
|
|
|
|
done
|
|
|
|
done
|
2013-01-28 15:53:51 +01:00
|
|
|
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -fp '"$fontPath"'";' unix/vncserver
|
2010-07-13 00:15:50 +02:00
|
|
|
'';
|
|
|
|
|
2016-01-14 07:31:30 +01:00
|
|
|
dontUseCmakeBuildDir = true;
|
2012-10-18 18:49:22 +02:00
|
|
|
|
2010-07-13 00:15:50 +02:00
|
|
|
postBuild = ''
|
2017-02-13 15:24:29 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error=int-to-pointer-cast -Wno-error=pointer-to-int-cast"
|
2016-01-14 07:31:30 +01:00
|
|
|
export CXXFLAGS="$CXXFLAGS -fpermissive"
|
2010-07-13 00:15:50 +02:00
|
|
|
# Build Xvnc
|
2016-01-14 07:31:30 +01:00
|
|
|
tar xf ${xorg.xorgserver.src}
|
2010-07-13 00:15:50 +02:00
|
|
|
cp -R xorg*/* unix/xserver
|
|
|
|
pushd unix/xserver
|
2016-12-13 17:27:23 +01:00
|
|
|
version=$(echo ${xorg.xorgserver.name} | sed 's/.*-\([0-9]\+\).\([0-9]\+\).*/\1\2/g')
|
|
|
|
patch -p1 < ${src}/unix/xserver$version.patch
|
2010-07-13 00:15:50 +02:00
|
|
|
autoreconf -vfi
|
2016-12-13 17:27:23 +01:00
|
|
|
./configure $configureFlags --disable-devel-docs --disable-docs \
|
|
|
|
--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
|
|
|
|
--disable-xwin --disable-xephyr --disable-kdrive --with-pic \
|
|
|
|
--disable-xorgcfg --disable-xprint --disable-static \
|
|
|
|
--disable-composite --disable-xtrap --enable-xcsecurity \
|
|
|
|
--disable-{a,c,m}fb \
|
|
|
|
--disable-xwayland \
|
|
|
|
--disable-config-dbus --disable-config-udev --disable-config-hal \
|
|
|
|
--disable-xevie \
|
|
|
|
--disable-dri --disable-dri2 --disable-dri3 --enable-glx \
|
|
|
|
--enable-install-libxf86config \
|
2014-08-15 16:51:50 +02:00
|
|
|
--prefix="$out" --disable-unit-tests \
|
|
|
|
--with-xkb-path=${xkeyboard_config}/share/X11/xkb \
|
2016-01-14 07:31:30 +01:00
|
|
|
--with-xkb-bin-directory=${xorg.xkbcomp}/bin \
|
2014-08-15 16:51:50 +02:00
|
|
|
--with-xkb-output=$out/share/X11/xkb/compiled
|
2010-07-13 00:15:50 +02:00
|
|
|
make TIGERVNC_SRCDIR=`pwd`/../..
|
|
|
|
popd
|
|
|
|
'';
|
2016-12-13 17:27:23 +01:00
|
|
|
|
2010-07-13 00:15:50 +02:00
|
|
|
postInstall = ''
|
2016-12-13 17:27:23 +01:00
|
|
|
pushd unix/xserver/hw/vnc
|
2010-07-13 00:15:50 +02:00
|
|
|
make TIGERVNC_SRCDIR=`pwd`/../.. install
|
2016-01-14 07:31:30 +01:00
|
|
|
popd
|
|
|
|
rm -f $out/lib/xorg/protocol.txt
|
2010-07-13 00:15:50 +02:00
|
|
|
|
2017-05-07 10:37:42 +02:00
|
|
|
wrapProgram $out/bin/vncserver \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath (with xorg; [ xterm twm xsetroot ]) }
|
|
|
|
'';
|
2011-12-03 10:29:38 +01:00
|
|
|
|
2017-05-07 10:37:42 +02:00
|
|
|
buildInputs = with xorg; [
|
|
|
|
libjpeg_turbo fltk pixman
|
|
|
|
gnutls pam nettle
|
|
|
|
fixesproto damageproto compositeproto randrproto
|
|
|
|
xcmiscproto bigreqsproto randrproto renderproto
|
|
|
|
fontsproto videoproto scrnsaverproto resourceproto presentproto
|
|
|
|
utilmacros libXtst libXext libX11 libXext libICE libXi libSM libXft
|
|
|
|
libxkbfile libXfont2 libpciaccess xineramaproto
|
|
|
|
glproto mesa_glu
|
|
|
|
] ++ xorgserver.buildInputs;
|
2013-01-28 15:53:51 +01:00
|
|
|
|
2017-05-07 10:37:42 +02:00
|
|
|
nativeBuildInputs = [ cmake zlib gettext libtool ] ++ xorg.xorgserver.nativeBuildInputs;
|
2016-01-14 07:31:30 +01:00
|
|
|
|
|
|
|
propagatedNativeBuildInputs = xorg.xorgserver.propagatedNativeBuildInputs;
|
2010-07-13 00:15:50 +02:00
|
|
|
|
2016-01-14 07:31:30 +01:00
|
|
|
enableParallelBuilding = true;
|
2010-07-13 00:15:50 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.tigervnc.org/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2010-07-13 00:15:50 +02:00
|
|
|
description = "Fork of tightVNC, made in cooperation with VirtualGL";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2016-01-14 07:31:30 +01:00
|
|
|
# Prevent a store collision.
|
|
|
|
priority = 4;
|
2010-07-13 00:15:50 +02:00
|
|
|
};
|
2016-04-13 15:21:04 +02:00
|
|
|
}
|