From c29e6c97f1b7a278e15e7868d712065eead4232d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 17 May 2010 16:16:48 +0000 Subject: [PATCH] Only set font in wrapper if we have X. Unison's wrapper was generating errors by calling xset even if DISPLAY was not set. This was especially noticeable when connecting to a remote server to sync with. Fix this by only setting the font path if DISPLAY is set to something. svn path=/nixpkgs/trunk/; revision=21821 --- pkgs/applications/networking/sync/unison/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index ff4ab601251..7738ce43f99 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation (rec { postInstall = '' for i in $(cd $out/bin && ls); do wrapProgram $out/bin/$i \ - --run "${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\"" + --run "[ -n \"\$DISPLAY\" ] && (${xset}/bin/xset q | grep -q \"${fontschumachermisc}\" || ${xset}/bin/xset +fp \"${fontschumachermisc}/lib/X11/fonts/misc\")" done '';