2008-03-31 00:19:20 +02:00
|
|
|
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, gettext, emacs, cpio
|
2008-03-11 15:07:58 +01:00
|
|
|
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_42
|
2008-03-15 21:52:21 +01:00
|
|
|
, libxslt, tcl, tk, makeWrapper }:
|
2007-04-26 18:14:01 +02:00
|
|
|
|
2007-11-14 22:41:01 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2008-04-12 14:52:31 +02:00
|
|
|
name = "git-1.5.5";
|
2007-04-26 18:14:01 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2007-11-14 22:41:01 +01:00
|
|
|
url = "mirror://kernel/software/scm/git/${name}.tar.bz2";
|
2008-04-12 14:52:31 +02:00
|
|
|
sha256 = "0pp6hfxkcwzb415wkkn713pqsv7cv06y90s53dyhsicqqn83hj17";
|
2007-04-26 18:14:01 +02:00
|
|
|
};
|
|
|
|
|
2008-03-31 00:19:20 +02:00
|
|
|
patches = [ ./pwd.patch ./docbook2texi.patch ];
|
2008-03-12 16:21:45 +01:00
|
|
|
|
2008-03-31 00:19:20 +02:00
|
|
|
buildInputs = [curl openssl zlib expat gettext cpio]
|
2008-03-11 15:07:58 +01:00
|
|
|
++ (if emacs != null then [emacs] else [])
|
|
|
|
++ # documentation tools
|
|
|
|
[ asciidoc texinfo xmlto docbook2x
|
2008-03-15 21:52:21 +01:00
|
|
|
docbook_xsl docbook_xml_dtd_42 libxslt ]
|
2008-04-15 14:37:44 +02:00
|
|
|
++ # Tcl/Tk
|
2008-03-15 21:52:21 +01:00
|
|
|
[ tcl tk makeWrapper ];
|
2007-04-26 18:14:01 +02:00
|
|
|
|
2007-11-14 22:41:01 +01:00
|
|
|
makeFlags="prefix=\${out} PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell}";
|
|
|
|
|
2008-02-22 17:51:51 +01:00
|
|
|
postInstall =
|
2008-03-11 15:07:58 +01:00
|
|
|
(if emacs != null then
|
2008-02-22 17:51:51 +01:00
|
|
|
''# Install Emacs mode.
|
|
|
|
echo "installing Emacs mode..."
|
|
|
|
make install -C contrib/emacs prefix="$out"
|
2008-02-20 11:29:32 +01:00
|
|
|
|
2008-02-22 17:51:51 +01:00
|
|
|
# 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"
|
2008-03-15 21:52:21 +01:00
|
|
|
echo "\`~/.nixpkgs/config.nix' file to change it." '')
|
2008-03-11 15:07:58 +01:00
|
|
|
+ ''# Install man pages and Info manual
|
|
|
|
make PERL_PATH="${perl}/bin/perl" cmd-list.made install install-info \
|
2008-03-15 21:52:21 +01:00
|
|
|
-C Documentation ''
|
|
|
|
|
2008-04-15 14:37:44 +02:00
|
|
|
+ ''# Wrap Tcl/Tk programs
|
|
|
|
for prog in gitk git-gui git-citool
|
2008-04-12 14:52:31 +02:00
|
|
|
do
|
|
|
|
wrapProgram "$out/bin/$prog" \
|
|
|
|
--set TK_LIBRARY "${tk}/lib/tk8.4" \
|
|
|
|
--prefix PATH : "${tk}/bin"
|
|
|
|
done ''
|
2008-04-11 00:12:11 +02:00
|
|
|
|
2008-03-31 00:19:20 +02:00
|
|
|
+ ''# Wrap `git-clone'
|
|
|
|
wrapProgram $out/bin/git-clone \
|
|
|
|
--prefix PATH : "${cpio}/bin" '';
|
2008-02-20 11:29:32 +01:00
|
|
|
|
2007-11-14 22:41:01 +01:00
|
|
|
meta = {
|
2008-02-20 11:29:32 +01:00
|
|
|
license = "GPLv2";
|
|
|
|
homepage = http://git.or.cz;
|
2008-03-31 00:19:20 +02:00
|
|
|
description = "Git, a popular distributed version control system";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Git, a popular distributed version control system designed to
|
|
|
|
handle very large projects with speed and efficiency.
|
|
|
|
'';
|
|
|
|
|
2007-11-14 22:41:01 +01:00
|
|
|
};
|
2007-04-26 18:14:01 +02:00
|
|
|
}
|