From 9f34ef8cf5a309261cd0be1d33db640c0c5ebb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 16 May 2009 23:04:06 +0000 Subject: [PATCH] Making tightvnc use given fonts, instead of depending of an X Font Server started at the usual unix socket. svn path=/nixpkgs/trunk/; revision=15624 --- pkgs/tools/admin/tightvnc/builder.sh | 19 ++++++++++++++++--- pkgs/tools/admin/tightvnc/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/admin/tightvnc/builder.sh b/pkgs/tools/admin/tightvnc/builder.sh index 95a1a6da9b59..05332fb46c26 100644 --- a/pkgs/tools/admin/tightvnc/builder.sh +++ b/pkgs/tools/admin/tightvnc/builder.sh @@ -1,9 +1,22 @@ source $stdenv/setup +patchPhase() { + fontPath= + for i in $fontDirectories; do + for j in $(find $i -name fonts.dir); do + addToSearchPathWithCustomDelimiter "," fontPath $(dirname $j) + done + done +} + buildPhase() { - xmkmf - make World - sed -e 's@/usr/bin/perl@'$perl'/bin/perl@' -i vncserver + + xmkmf + make World + + sed -e 's@/usr/bin/perl@'$perl'/bin/perl@' \ + -e 's@unix/:7100@'$fontPath'@' \ + -i vncserver cd Xvnc sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix index edc3e7d51e3f..10ed5dc50f22 100644 --- a/pkgs/tools/admin/tightvnc/default.nix +++ b/pkgs/tools/admin/tightvnc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, x11, zlib, libjpeg, imake, gccmakedep, libXmu, libXaw, libXpm, libXp , perl, xauth}: +{stdenv, fetchurl, x11, zlib, libjpeg, imake, gccmakedep, libXmu, libXaw, libXpm, libXp , perl, xauth, fontDirectories}: stdenv.mkDerivation { name = "tightvnc-1.3.10"; @@ -13,6 +13,8 @@ stdenv.mkDerivation { # for the builder script inherit xauth; + inherit fontDirectories; + buildInputs = [x11 zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp xauth]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbed64dab9cb..8a4ab8442c6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1364,6 +1364,8 @@ let tightvnc = import ../tools/admin/tightvnc { inherit fetchurl stdenv x11 zlib libjpeg perl; inherit (xlibs) imake gccmakedep libXmu libXaw libXpm libXp xauth; + fontDirectories = [ xorg.fontadobe75dpi xorg.fontmiscmisc xorg.fontcursormisc + xorg.fontbhlucidatypewriter75dpi ]; }; time = import ../tools/misc/time {