Git: Make dependency on Emacs optional, per Yuri's request.
This works by looking for `git.useEmacs', a boolean, in the user's Nixpkgs config file. The default is `true' since it's only a build-time dependency and most users are expected to install the pre-compiled substitute, which doesn't pull Emacs. svn path=/nixpkgs/trunk/; revision=10837
This commit is contained in:
parent
c800565c73
commit
adc77fc0c7
@ -8,18 +8,22 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "089n3da06k19gzhacsqgaamgx5hy5r50r2b4a626s87w44mj78sn";
|
sha256 = "089n3da06k19gzhacsqgaamgx5hy5r50r2b4a626s87w44mj78sn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [curl openssl zlib expat gettext emacs];
|
buildInputs = [curl openssl zlib expat gettext]
|
||||||
|
++ (if emacs != null then [emacs] else []);
|
||||||
|
|
||||||
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 =
|
||||||
# Install Emacs mode.
|
if emacs != null then
|
||||||
echo "installing Emacs mode..."
|
''# Install Emacs mode.
|
||||||
make install -C contrib/emacs prefix="$out"
|
echo "installing Emacs mode..."
|
||||||
|
make install -C contrib/emacs prefix="$out"
|
||||||
|
|
||||||
# XXX: There are other things under `contrib' that people might want to
|
# XXX: There are other things under `contrib' that people might want to
|
||||||
# install.
|
# install. ''
|
||||||
'';
|
else
|
||||||
|
''echo "NOT installing Emacs mode. Set \`git.useEmacs' to \`true' in your"
|
||||||
|
echo "\`~/.nixpkgs/config.nix' file to change it."'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
license = "GPLv2";
|
license = "GPLv2";
|
||||||
|
@ -4844,7 +4844,8 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
git = import ../applications/version-management/git {
|
git = import ../applications/version-management/git {
|
||||||
inherit fetchurl stdenv curl openssl zlib expat perl gettext emacs;
|
inherit fetchurl stdenv curl openssl zlib expat perl gettext;
|
||||||
|
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