2021-01-23 12:26:19 +00:00
|
|
|
{ fetchurl, lib, stdenv, ncurses
|
2016-09-17 00:57:53 +00:00
|
|
|
, emacsSupport ? true, emacs
|
|
|
|
}:
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-20 10:34:30 +00:00
|
|
|
pname = "cscope";
|
|
|
|
version = "15.9";
|
2008-08-25 15:34:14 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-20 10:34:30 +00:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2018-08-09 01:13:29 +00:00
|
|
|
sha256 = "0ngiv4aj3rr35k3q3wjx0y19gh7i1ydqa0cqip6sjwd8fph5ll65";
|
2008-08-25 15:34:14 +00:00
|
|
|
};
|
|
|
|
|
2018-07-25 21:44:21 +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 ];
|
2021-01-23 12:26:19 +00:00
|
|
|
nativeBuildInputs = lib.optional emacsSupport emacs;
|
2008-08-25 15:34:14 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
postInstall = 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";
|
|
|
|
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://cscope.sourceforge.net/";
|
2009-12-11 14:47:16 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
maintainers = with lib.maintainers; [viric];
|
2009-12-11 14:47:16 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2008-08-25 15:34:14 +00:00
|
|
|
};
|
|
|
|
}
|