2016-09-17 03:06:01 +02:00
|
|
|
{ fetchurl, stdenv, ncurses
|
2016-09-17 02:57:53 +02:00
|
|
|
, emacsSupport ? true, emacs
|
|
|
|
}:
|
2008-08-25 17:34:14 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-09 03:13:29 +02:00
|
|
|
name = "cscope-15.9";
|
2008-08-25 17:34:14 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-08-23 10:15:12 +02:00
|
|
|
url = "mirror://sourceforge/cscope/${name}.tar.gz";
|
2018-08-09 03:13:29 +02:00
|
|
|
sha256 = "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65";
|
2008-08-25 17:34:14 +02:00
|
|
|
};
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [ "--with-ncurses=${ncurses.dev}" ];
|
2008-08-25 17:34:14 +02:00
|
|
|
|
2010-12-04 22:43:24 +01:00
|
|
|
buildInputs = [ ncurses ];
|
2016-09-17 03:06:01 +02:00
|
|
|
nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
|
2008-08-25 17:34:14 +02:00
|
|
|
|
2016-09-17 02:57:53 +02:00
|
|
|
postInstall = stdenv.lib.optionalString emacsSupport ''
|
2008-08-25 17:34:14 +02:00
|
|
|
cd "contrib/xcscope"
|
|
|
|
|
2016-09-17 02:55:24 +02: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 21:16:00 +01:00
|
|
|
mkdir -p "$out/libexec/cscope"
|
2008-08-25 17:34:14 +02:00
|
|
|
cp "cscope-indexer" "$out/libexec/cscope"
|
|
|
|
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p "$out/share/emacs/site-lisp"
|
2008-08-25 17:34:14 +02:00
|
|
|
emacs --batch --eval '(byte-compile-file "xcscope.el")'
|
|
|
|
cp xcscope.el{,c} "$out/share/emacs/site-lisp"
|
2009-12-11 15:47:16 +01:00
|
|
|
'';
|
2008-08-25 17:34:14 +02:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "A developer's tool for browsing source code";
|
2008-08-25 17:34:14 +02: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 15:47:16 +01:00
|
|
|
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
|
2016-12-26 21:55:39 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-08-25 17:34:14 +02:00
|
|
|
};
|
|
|
|
}
|