From fdbef21ceb8fba41b37a5c0199716bf09e7cd18f Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sat, 3 Dec 2011 09:29:38 +0000 Subject: [PATCH] Adjust most things to be cross-buildable. Problem: gnutls. Solution: manually replace it with openssl while cross-building svn path=/nixpkgs/trunk/; revision=30709 --- pkgs/tools/admin/tigervnc/default.nix | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index 6658b85c79fa..36aae0684385 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -1,6 +1,12 @@ { stdenv, fetchurl, libX11, libXext, gettext, libICE, libXtst, libXi, libSM, xorgserver , autoconf, automake, cvs, libtool, nasm, utilmacros, pixman, xkbcomp, xkeyboard_config -, fontDirectories, fontutil, libgcrypt, gnutls, pam }: +, fontDirectories, fontutil, libgcrypt, gnutls, pam, flex, bison +, fixesproto, damageproto, xcmiscproto, bigreqsproto, randrproto, renderproto +, fontsproto, videoproto, compositeproto, scrnsaverproto, resourceproto +, libxkbfile, libXfont, libpciaccess +}: + + with stdenv.lib; @@ -17,9 +23,9 @@ stdenv.mkDerivation rec { 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 + sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.hostDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am + sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.hostDrv else xkbcomp}/bin";' unix/vncserver + sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.hostDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver fontPath= for i in $fontDirectories; do @@ -62,13 +68,22 @@ stdenv.mkDerivation rec { make TIGERVNC_SRCDIR=`pwd`/../.. install ''; + crossAttrs = { + buildInputs = (map (x : x.hostDrv) (buildInputs ++ [ + fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto + fontsproto videoproto compositeproto scrnsaverproto resourceproto + libxkbfile libXfont libpciaccess + ])); + }; + buildInputs = [ libX11 libXext gettext libICE libXtst libXi libSM - libtool nasm utilmacros fontutil libgcrypt gnutls pam + nasm libgcrypt gnutls pam pixman ]; buildNativeInputs = - [ autoconf automake cvs ] ++ xorgserver.buildNativeInputs; + [ autoconf automake cvs utilmacros fontutil libtool flex bison ] + ++ xorgserver.buildNativeInputs; propagatedBuildNativeInputs = xorgserver.propagatedBuildNativeInputs;