diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix index ed445663aa90..305087d59c87 100644 --- a/pkgs/development/tools/misc/cscope/default.nix +++ b/pkgs/development/tools/misc/cscope/default.nix @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2474a7c0cc93..b1468e166654 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {