Git: Wrap `gitk' so that it finds Tcl/Tk.

svn path=/nixpkgs/trunk/; revision=11133
This commit is contained in:
Ludovic Courtès 2008-03-15 20:52:21 +00:00
parent f87e85c2a8
commit 2788bf2902
2 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs { fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42 , asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
, libxslt }: , libxslt, tcl, tk, makeWrapper }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "git-1.5.4.4"; name = "git-1.5.4.4";
@ -16,7 +16,9 @@ stdenv.mkDerivation rec {
++ (if emacs != null then [emacs] else []) ++ (if emacs != null then [emacs] else [])
++ # documentation tools ++ # documentation tools
[ asciidoc texinfo xmlto docbook2x [ asciidoc texinfo xmlto docbook2x
docbook_xsl docbook_xml_dtd_42 libxslt ]; docbook_xsl docbook_xml_dtd_42 libxslt ]
++ # Tcl/Tk, for `gitk'
[ tcl tk makeWrapper ];
makeFlags="prefix=\${out} PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell}"; makeFlags="prefix=\${out} PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell}";
@ -30,10 +32,16 @@ stdenv.mkDerivation rec {
# install. '' # install. ''
else else
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your" ''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
echo "\`~/.nixpkgs/config.nix' file to change it."'') echo "\`~/.nixpkgs/config.nix' file to change it." '')
+ ''# Install man pages and Info manual + ''# Install man pages and Info manual
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \ make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
-C Documentation''; -C Documentation ''
+ ''# Wrap `gitk'
wrapProgram $out/bin/gitk \
--set TK_LIBRARY "${tk}/lib/tk8.4" \
--prefix PATH : "${tk}/bin" '';
meta = { meta = {
license = "GPLv2"; license = "GPLv2";

View File

@ -4998,7 +4998,8 @@ rec {
git = import ../applications/version-management/git { git = import ../applications/version-management/git {
inherit fetchurl stdenv curl openssl zlib expat perl gettext inherit fetchurl stdenv curl openssl zlib expat perl gettext
asciidoc texinfo xmlto docbook2x asciidoc texinfo xmlto docbook2x
docbook_xsl docbook_xml_dtd_42 libxslt; docbook_xsl docbook_xml_dtd_42 libxslt
tcl tk makeWrapper;
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null; emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
}; };