* git: make the TCL/TK GUI optional (git.guiSupport).
* git: always install the Emacs mode but don't depend on Emacs to do it (just don't build the .elc files). svn path=/nixpkgs/trunk/; revision=12037
This commit is contained in:
parent
d139e5244c
commit
68c6b5f2fc
@ -1,7 +1,9 @@
|
|||||||
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs, cpio
|
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, cpio
|
||||||
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
||||||
, libxslt, tcl, tk, makeWrapper
|
, libxslt, tcl, tk, makeWrapper
|
||||||
, svnSupport, subversion, perlLibs }:
|
, svnSupport, subversion, perlLibs
|
||||||
|
, guiSupport
|
||||||
|
}:
|
||||||
|
|
||||||
# `git-svn' support requires Subversion and various Perl libraries.
|
# `git-svn' support requires Subversion and various Perl libraries.
|
||||||
# FIXME: We should make sure Subversion comes with its Perl bindings.
|
# FIXME: We should make sure Subversion comes with its Perl bindings.
|
||||||
@ -18,27 +20,21 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = [ ./pwd.patch ./docbook2texi.patch ];
|
patches = [ ./pwd.patch ./docbook2texi.patch ];
|
||||||
|
|
||||||
buildInputs = [curl openssl zlib expat gettext cpio]
|
buildInputs = [curl openssl zlib expat gettext cpio makeWrapper]
|
||||||
++ (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
|
++ stdenv.lib.optionals guiSupport [tcl tk];
|
||||||
[ 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}";
|
||||||
|
|
||||||
postInstall =
|
postInstall =
|
||||||
(if emacs != null then
|
''
|
||||||
''# Install Emacs mode.
|
# Install Emacs mode.
|
||||||
echo "installing Emacs mode..."
|
echo "installing Emacs mode..."
|
||||||
make install -C contrib/emacs prefix="$out"
|
ensureDir $out/share/emacs/site-lisp
|
||||||
|
cp -p contrib/emacs/*.el $out/share/emacs/site-lisp
|
||||||
# XXX: There are other things under `contrib' that people might want to
|
'' # */
|
||||||
# install. ''
|
|
||||||
else
|
|
||||||
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
|
|
||||||
echo "\`~/.nixpkgs/config.nix' file to change it." '')
|
|
||||||
|
|
||||||
+ (if svnSupport then
|
+ (if svnSupport then
|
||||||
|
|
||||||
@ -58,13 +54,15 @@ stdenv.mkDerivation rec {
|
|||||||
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 Tcl/Tk programs
|
+ (if guiSupport then ''
|
||||||
|
# Wrap Tcl/Tk programs
|
||||||
for prog in gitk git-gui git-citool
|
for prog in gitk git-gui git-citool
|
||||||
do
|
do
|
||||||
wrapProgram "$out/bin/$prog" \
|
wrapProgram "$out/bin/$prog" \
|
||||||
--set TK_LIBRARY "${tk}/lib/tk8.4" \
|
--set TK_LIBRARY "${tk}/lib/tk8.4" \
|
||||||
--prefix PATH : "${tk}/bin"
|
--prefix PATH : "${tk}/bin"
|
||||||
done ''
|
done
|
||||||
|
'' else "")
|
||||||
|
|
||||||
+ ''# Wrap `git-clone'
|
+ ''# Wrap `git-clone'
|
||||||
wrapProgram $out/bin/git-clone \
|
wrapProgram $out/bin/git-clone \
|
||||||
|
@ -5851,14 +5851,10 @@ let pkgs = rec {
|
|||||||
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
|
||||||
cpio tcl tk makeWrapper;
|
cpio tcl tk makeWrapper subversion;
|
||||||
|
svnSupport = getConfig ["git" "svnSupport"] false; # for git-svn support
|
||||||
# for git-svn support:
|
guiSupport = getConfig ["git" "guiSupport"] false;
|
||||||
svnSupport = getConfig [ "git" "svnSupport" ] false;
|
perlLibs = [perlLWP perlURI perlTermReadKey subversion];
|
||||||
inherit subversion ;
|
|
||||||
perlLibs = [ perlLWP perlURI perlTermReadKey subversion ];
|
|
||||||
|
|
||||||
emacs = if (getConfig ["git" "useEmacs"] true) then emacs else null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
gkrellm = import ../applications/misc/gkrellm {
|
gkrellm = import ../applications/misc/gkrellm {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user