2016-09-17 01:06:01 +00:00
|
|
|
{ fetchurl, stdenv, ncurses
|
2016-09-17 00:57:53 +00:00
|
|
|
, emacsSupport ? true, emacs
|
|
|
|
}:
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-09-17 01:06:22 +00:00
|
|
|
name = "cscope-15.8b";
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-08-23 08:15:12 +00:00
|
|
|
url = "mirror://sourceforge/cscope/${name}.tar.gz";
|
2016-09-17 01:06:22 +00:00
|
|
|
sha256 = "1byk29rcpyygrnr03h5j3y8j0aqxldd9dr5ihi9q982sy28x12a8";
|
2008-08-25 15:34:14 +00:00
|
|
|
};
|
|
|
|
|
2016-04-16 17:41:10 +00:00
|
|
|
configureFlags = "--with-ncurses=${ncurses.dev}";
|
2008-08-25 15:34:14 +00:00
|
|
|
|
2010-12-04 21:43:24 +00:00
|
|
|
buildInputs = [ ncurses ];
|
2016-09-17 01:06:01 +00:00
|
|
|
nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
|
2008-08-25 15:34:14 +00:00
|
|
|
|
2016-09-17 00:57:53 +00:00
|
|
|
postInstall = stdenv.lib.optionalString emacsSupport ''
|
2008-08-25 15:34:14 +00:00
|
|
|
cd "contrib/xcscope"
|
|
|
|
|
2016-09-17 00:55:24 +00:00
|
|
|
sed -i "cscope-indexer" \
|
|
|
|
-"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g"
|
|
|
|
sed -i "xcscope.el" \
|
|
|
|
-"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g";
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/libexec/cscope"
|
2008-08-25 15:34:14 +00:00
|
|
|
cp "cscope-indexer" "$out/libexec/cscope"
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/emacs/site-lisp"
|
2008-08-25 15:34:14 +00:00
|
|
|
emacs --batch --eval '(byte-compile-file "xcscope.el")'
|
|
|
|
cp xcscope.el{,c} "$out/share/emacs/site-lisp"
|
2009-12-11 14:47:16 +00:00
|
|
|
'';
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "A developer's tool for browsing source code";
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Cscope is a developer's tool for browsing source code. It has
|
|
|
|
an impeccable Unix pedigree, having been originally developed at
|
|
|
|
Bell Labs back in the days of the PDP-11. Cscope was part of
|
|
|
|
the official AT&T Unix distribution for many years, and has been
|
|
|
|
used to manage projects involving 20 million lines of code!
|
|
|
|
'';
|
|
|
|
|
|
|
|
license = "BSD-style";
|
|
|
|
|
|
|
|
homepage = http://cscope.sourceforge.net/;
|
2009-12-11 14:47:16 +00:00
|
|
|
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
|
2016-12-26 20:55:39 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-08-25 15:34:14 +00:00
|
|
|
};
|
|
|
|
}
|