Files
nixpkgs/pkgs/development/tools/misc/cscope/default.nix
T

59 lines
1.6 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, ncurses
2016-09-16 20:57:53 -04:00
, emacsSupport ? true, emacs
}:
2008-08-25 15:34:14 +00:00
stdenv.mkDerivation rec {
2016-09-16 21:06:22 -04:00
name = "cscope-15.8b";
2008-08-25 15:34:14 +00:00
src = fetchurl {
2012-08-23 10:15:12 +02:00
url = "mirror://sourceforge/cscope/${name}.tar.gz";
2016-09-16 21:06:22 -04:00
sha256 = "1byk29rcpyygrnr03h5j3y8j0aqxldd9dr5ihi9q982sy28x12a8";
2008-08-25 15:34:14 +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 ];
nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
2008-08-25 15:34:14 +00:00
2016-09-16 20:57:53 -04:00
postInstall = stdenv.lib.optionalString emacsSupport ''
2008-08-25 15:34:14 +00:00
cd "contrib/xcscope"
sed -i "cscope-indexer" \
-"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g"
sed -i "xcscope.el" \
-"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g";
mkdir -p "$out/libexec/cscope"
2008-08-25 15:34:14 +00:00
cp "cscope-indexer" "$out/libexec/cscope"
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"
'';
2008-08-25 15:34:14 +00:00
crossAttrs = {
postInstall = "";
propagatedBuildInputs = [ ncurses.crossDrv ];
};
2008-08-25 15:34:14 +00:00
meta = {
2014-08-24 16:21:08 +02: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/;
maintainers = with stdenv.lib.maintainers; [viric];
2016-12-26 14:55:39 -06:00
platforms = stdenv.lib.platforms.unix;
2008-08-25 15:34:14 +00:00
};
}