about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2008-07-03 12:51:23 +0000
committerMarc Weber <marco-oweber@gmx.de>2008-07-03 12:51:23 +0000
commit18b30f54ce43dd6059ca9df7d2ccfe17ab11f87c (patch)
treed1bdb95766593b941aa8e73c393a0b8d04cacbcd /pkgs/applications/version-management/git
parent033d8cd1f3c8ccaebb5aa5dd4d2186744bc580aa (diff)
adding not supported message for git tools requiring extra config settings to work. exiting with exit status 1
svn path=/nixpkgs/trunk/; revision=12250
Diffstat (limited to 'pkgs/applications/version-management/git')
-rw-r--r--pkgs/applications/version-management/git/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix
index 74b45db14a1d7..a9e628918cac0 100644
--- a/pkgs/applications/version-management/git/default.nix
+++ b/pkgs/applications/version-management/git/default.nix
@@ -30,6 +30,11 @@ stdenv.mkDerivation rec {
 
   postInstall =
     ''
+      notSupported(){
+        echo -e "#\!/bin/sh\necho '`basename $1` not supported, $2'\nexit 1" > "$1"
+        chmod +x $1
+      }
+
       # Install Emacs mode.
       echo "installing Emacs mode..."
       ensureDir $out/share/emacs/site-lisp
@@ -46,9 +51,9 @@ stdenv.mkDerivation rec {
         wrapProgram "$out/bin/git-svn"                  \
                      --set GITPERLLIB "$gitperllib"     \
                      --prefix PATH : "${subversion}/bin" ''
-       else ''
-       echo "NOT installing \`git-svn' since \`svnSupport' is false."
-       rm $out/bin/git-svn '')
+       else '' # replace git-svn by notification script
+        notSupported $out/bin/git-svn "reinstall with config git = { svnSupport = true } set"
+       '')
 
    + ''# Install man pages and Info manual
        make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
@@ -62,7 +67,13 @@ stdenv.mkDerivation rec {
                      --set TK_LIBRARY "${tk}/lib/tk8.4" \
                      --prefix PATH : "${tk}/bin"
        done
-     '' else "")
+     '' else ''
+      # don not wrap Tcl/Tk, replace them by notification scripts
+       for prog in gitk git-gui git-citool
+       do
+         notSupported "$out/bin/$prog" "reinstall with config git = { guiSupport = true } set"
+       done
+     '')
 
    + ''# Wrap `git-clone'
        wrapProgram $out/bin/git-clone                   \