From 18b30f54ce43dd6059ca9df7d2ccfe17ab11f87c Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Thu, 3 Jul 2008 12:51:23 +0000 Subject: [PATCH] adding not supported message for git tools requiring extra config settings to work. exiting with exit status 1 svn path=/nixpkgs/trunk/; revision=12250 --- .../version-management/git/default.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix index 74b45db14a1..a9e628918ca 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 \