forked from mirrors/nixpkgs
git: install contrib code included in the distribution
TODO: byte-compile emacs modules svn path=/nixpkgs/trunk/; revision=27665
This commit is contained in:
parent
2fee0ecef9
commit
e4353b1f65
|
@ -41,16 +41,19 @@ stdenv.mkDerivation rec {
|
||||||
chmod +x $1
|
chmod +x $1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install Emacs mode.
|
# Install contrib stuff.
|
||||||
echo "installing Emacs mode..."
|
ensureDir $out/share/git
|
||||||
|
mv contrib $out/share/git/
|
||||||
ensureDir $out/share/emacs/site-lisp
|
ensureDir $out/share/emacs/site-lisp
|
||||||
cp -p contrib/emacs/*.el $out/share/emacs/site-lisp
|
ln -s "$out/share/git/contrib/emacs/"*.el $out/share/emacs/site-lisp/
|
||||||
|
ensureDir $out/etc/bash_completion.d
|
||||||
|
ln -s $out/share/git/contrib/completion/git-completion.bash $out/etc/bash_completion.d/
|
||||||
|
|
||||||
# grep is a runtime dependence, need to patch so that it's found
|
# grep is a runtime dependence, need to patch so that it's found
|
||||||
substituteInPlace $out/libexec/git-core/git-sh-setup \
|
substituteInPlace $out/libexec/git-core/git-sh-setup \
|
||||||
--replace ' grep' ' ${gnugrep}/bin/grep' \
|
--replace ' grep' ' ${gnugrep}/bin/grep' \
|
||||||
--replace ' egrep' ' ${gnugrep}/bin/egrep'
|
--replace ' egrep' ' ${gnugrep}/bin/egrep'
|
||||||
'' # */
|
''
|
||||||
|
|
||||||
+ (if svnSupport then
|
+ (if svnSupport then
|
||||||
|
|
||||||
|
@ -97,10 +100,6 @@ stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'')
|
'')
|
||||||
|
|
||||||
+ ''# install bash completion script
|
|
||||||
d="$out/etc/bash_completion.d"
|
|
||||||
ensureDir $d; cp contrib/completion/git-completion.bash "$d"
|
|
||||||
''
|
|
||||||
# Don't know why hardlinks aren't created. git installs the same executable
|
# Don't know why hardlinks aren't created. git installs the same executable
|
||||||
# multiple times into $out so replace duplicates by symlinks because I
|
# multiple times into $out so replace duplicates by symlinks because I
|
||||||
# haven't tested whether the nix distribution system can handle hardlinks.
|
# haven't tested whether the nix distribution system can handle hardlinks.
|
||||||
|
@ -109,6 +108,7 @@ stdenv.mkDerivation rec {
|
||||||
declare -A seen
|
declare -A seen
|
||||||
shopt -s globstar
|
shopt -s globstar
|
||||||
for f in "$out/"**; do
|
for f in "$out/"**; do
|
||||||
|
if [ -L "$f" ]; then continue; fi
|
||||||
test -f "$f" || continue
|
test -f "$f" || continue
|
||||||
sum=$(md5sum "$f");
|
sum=$(md5sum "$f");
|
||||||
sum=''\${sum/ */}
|
sum=''\${sum/ */}
|
||||||
|
|
Loading…
Reference in a new issue