2016-09-17 02:06:01 +01:00
|
|
|
{ fetchurl, stdenv, ncurses
|
2016-09-17 01:57:53 +01:00
|
|
|
, emacsSupport ? true, emacs
|
|
|
|
}:
|
2008-08-25 16:34:14 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-09 02:13:29 +01:00
|
|
|
name = "cscope-15.9";
|
2008-08-25 16:34:14 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-08-23 09:15:12 +01:00
|
|
|
url = "mirror://sourceforge/cscope/${name}.tar.gz";
|
2018-08-09 02:13:29 +01:00
|
|
|
sha256 = "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65";
|
2008-08-25 16:34:14 +01:00
|
|
|
};
|
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [ "--with-ncurses=${ncurses.dev}" ];
|
2008-08-25 16:34:14 +01:00
|
|
|
|
2010-12-04 21:43:24 +00:00
|
|
|
buildInputs = [ ncurses ];
|
2016-09-17 02:06:01 +01:00
|
|
|
nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
|
2008-08-25 16:34:14 +01:00
|
|
|
|
2016-09-17 01:57:53 +01:00
|
|
|
postInstall = stdenv.lib.optionalString emacsSupport ''
|
2008-08-25 16:34:14 +01:00
|
|
|
cd "contrib/xcscope"
|
|
|
|
|
2016-09-17 01:55:24 +01: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 16:34:14 +01: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 16:34:14 +01: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 16:34:14 +01:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "A developer's tool for browsing source code";
|
2008-08-25 16:34:14 +01: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";
|
|
|
|
|
2020-04-01 02:11:51 +01:00
|
|
|
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 16:34:14 +01:00
|
|
|
};
|
|
|
|
}
|