diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index 23f93a1f6b00..e3071c3de4ba 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -1,5 +1,6 @@ {stdenv, fetchsvn, libX11, libXext, gettext, libICE, libXtst, libXi, libSM, xorgserver, -autoconf, automake, cvs, libtool, nasm, utilmacros, pixman }: +autoconf, automake, cvs, libtool, nasm, utilmacros, pixman, xkbcomp, xkeyboard_config, +fontDirectories }: with stdenv.lib; @@ -17,8 +18,21 @@ stdenv.mkDerivation { configureFlags = "--enable-nls"; + inherit fontDirectories; + patchPhase = '' sed -i -e 's,$(includedir)/pixman-1,${pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am + sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${xkbcomp}/bin";' unix/vncserver + sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${xkeyboard_config}/etc/X11/xkb";' unix/vncserver + + fontPath= + for i in $fontDirectories; do + for j in $(find $i -name fonts.dir); do + addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j) + done + done + + sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -fp '"$fontPath"'";' unix/vncserver ''; # I don't know why I can't use in the script diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22993e94a46a..c2747791ce58 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1821,8 +1821,10 @@ let }; tigervnc = import ../tools/admin/tigervnc { - inherit fetchsvn stdenv gettext autoconf automake cvs libtool nasm; - inherit (xorg) libX11 libXext libICE libXtst libXi libSM xorgserver utilmacros pixman; + inherit fetchsvn stdenv gettext autoconf automake cvs libtool nasm xkeyboard_config; + inherit (xorg) libX11 libXext libICE libXtst libXi libSM xorgserver utilmacros pixman xkbcomp; + fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc + xorg.fontbhlucidatypewriter75dpi ]; }; tightvnc = import ../tools/admin/tightvnc {