forked from mirrors/nixpkgs
Updating cscope, and making its dependency on emacs optional (and off by default),
due to something called 'install emacs mode'. svn path=/nixpkgs/trunk/; revision=18901
This commit is contained in:
parent
833832dc92
commit
2ccf2984eb
pkgs
|
@ -1,11 +1,15 @@
|
||||||
{ fetchurl, stdenv, ncurses, pkgconfig, emacs }:
|
{ fetchurl, stdenv, ncurses, pkgconfig
|
||||||
|
, installEmacsMode ? false, emacs ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert installEmacsMode -> emacs != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cscope-15.6";
|
name = "cscope-15.7a";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/cscope/${name}.tar.gz";
|
url = "mirror://sourceforge/cscope/${name}.tar.bz2";
|
||||||
sha256 = "1jn5r9xhys7dlhxxiwffx9wrxlaf9i9ffh6dw516w79a83pn2r3d";
|
sha256 = "0dv0r66x31y2xxvad54x0wal8yb1krwbx3gjc82qpg4hlz5qnqq2";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -17,9 +21,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = "--with-ncurses=${ncurses}";
|
configureFlags = "--with-ncurses=${ncurses}";
|
||||||
|
|
||||||
buildInputs = [ ncurses pkgconfig emacs ];
|
buildInputs = [ ncurses pkgconfig ] ++ stdenv.lib.optional installEmacsMode emacs;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = if installEmacsMode then ''
|
||||||
# Install Emacs mode.
|
# Install Emacs mode.
|
||||||
cd "contrib/xcscope"
|
cd "contrib/xcscope"
|
||||||
|
|
||||||
|
@ -29,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||||
ensureDir "$out/share/emacs/site-lisp"
|
ensureDir "$out/share/emacs/site-lisp"
|
||||||
emacs --batch --eval '(byte-compile-file "xcscope.el")'
|
emacs --batch --eval '(byte-compile-file "xcscope.el")'
|
||||||
cp xcscope.el{,c} "$out/share/emacs/site-lisp"
|
cp xcscope.el{,c} "$out/share/emacs/site-lisp"
|
||||||
'';
|
'' else "";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Cscope, a developer's tool for browsing source code";
|
description = "Cscope, a developer's tool for browsing source code";
|
||||||
|
|
|
@ -2662,6 +2662,7 @@ let
|
||||||
|
|
||||||
cscope = import ../development/tools/misc/cscope {
|
cscope = import ../development/tools/misc/cscope {
|
||||||
inherit fetchurl stdenv ncurses pkgconfig emacs;
|
inherit fetchurl stdenv ncurses pkgconfig emacs;
|
||||||
|
installEmacsMode = getConfig [ "cscope" "installEmacsMode" ] false;
|
||||||
};
|
};
|
||||||
|
|
||||||
dejagnu = import ../development/tools/misc/dejagnu {
|
dejagnu = import ../development/tools/misc/dejagnu {
|
||||||
|
|
Loading…
Reference in a new issue