mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
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
@ -1,11 +1,15 @@
|
||||
{ fetchurl, stdenv, ncurses, pkgconfig, emacs }:
|
||||
{ fetchurl, stdenv, ncurses, pkgconfig
|
||||
, installEmacsMode ? false, emacs ? null
|
||||
}:
|
||||
|
||||
assert installEmacsMode -> emacs != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cscope-15.6";
|
||||
name = "cscope-15.7a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/cscope/${name}.tar.gz";
|
||||
sha256 = "1jn5r9xhys7dlhxxiwffx9wrxlaf9i9ffh6dw516w79a83pn2r3d";
|
||||
url = "mirror://sourceforge/cscope/${name}.tar.bz2";
|
||||
sha256 = "0dv0r66x31y2xxvad54x0wal8yb1krwbx3gjc82qpg4hlz5qnqq2";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
@ -17,9 +21,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = "--with-ncurses=${ncurses}";
|
||||
|
||||
buildInputs = [ ncurses pkgconfig emacs ];
|
||||
buildInputs = [ ncurses pkgconfig ] ++ stdenv.lib.optional installEmacsMode emacs;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = if installEmacsMode then ''
|
||||
# Install Emacs mode.
|
||||
cd "contrib/xcscope"
|
||||
|
||||
@ -29,7 +33,7 @@ stdenv.mkDerivation rec {
|
||||
ensureDir "$out/share/emacs/site-lisp"
|
||||
emacs --batch --eval '(byte-compile-file "xcscope.el")'
|
||||
cp xcscope.el{,c} "$out/share/emacs/site-lisp"
|
||||
'';
|
||||
'' else "";
|
||||
|
||||
meta = {
|
||||
description = "Cscope, a developer's tool for browsing source code";
|
||||
|
@ -2662,6 +2662,7 @@ let
|
||||
|
||||
cscope = import ../development/tools/misc/cscope {
|
||||
inherit fetchurl stdenv ncurses pkgconfig emacs;
|
||||
installEmacsMode = getConfig [ "cscope" "installEmacsMode" ] false;
|
||||
};
|
||||
|
||||
dejagnu = import ../development/tools/misc/dejagnu {
|
||||
|
Loading…
Reference in New Issue
Block a user