From 167f1854117d0dc636d75c001dcba3376a4a3ec4 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 7 Jan 2011 11:03:42 +0000 Subject: [PATCH] pkgs/applications/version-management/git-and-tools/git: fixed "git gui" The git-gui module cannot be wrapped like gitk, because the Tcl implementation uses the program's basename to determine stuff like the name of the Window it opens, etc., and it cannot deal with a program name that contain a dot, like ".git-gui-wrapped" did. Instead of wrapping git-gui, it's now patched to execute 'wish' with a complete store path. While I was at it, I also applied this solution to git-gui--askpass. svn path=/nixpkgs/trunk/; revision=25453 --- .../version-management/git-and-tools/git/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 1988646d5b5..5d9b92f8cb1 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -84,12 +84,16 @@ stdenv.mkDerivation rec { + (if guiSupport then '' # Wrap Tcl/Tk programs - for prog in bin/gitk libexec/git-core/git-gui - do + for prog in bin/gitk; do wrapProgram "$out/$prog" \ --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}" \ --prefix PATH : "${tk}/bin" done + for prog in git-gui git-citool git-gui--askpass; do + sed -i -e "s|exec 'wish'|exec '${tk}/bin/wish'|g" \ + -e "s|exec wish|exec '${tk}/bin/wish'|g" \ + "$out/libexec/git-core/$prog" + done '' else '' # Don't wrap Tcl/Tk, replace them by notification scripts for prog in bin/gitk libexec/git-core/git-gui