at v192 59 lines 1.7 kB view raw
1{ fetchurl, stdenv, ncurses, pkgconfig, emacs}: 2 3stdenv.mkDerivation rec { 4 name = "cscope-15.8a"; 5 6 src = fetchurl { 7 url = "mirror://sourceforge/cscope/${name}.tar.gz"; 8 sha256 = "07jdhxvp3dv7acvp0pwsdab1g2ncxjlcf838lj7vxgjs1p26lwzb"; 9 }; 10 11 preConfigure = '' 12 sed -i "contrib/xcscope/cscope-indexer" \ 13 -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g" 14 sed -i "contrib/xcscope/xcscope.el" \ 15 -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g"; 16 ''; 17 18 configureFlags = "--with-ncurses=${ncurses}"; 19 20 buildInputs = [ ncurses ]; 21 nativeBuildInputs = [ pkgconfig emacs ]; 22 23 postInstall = '' 24 # Install Emacs mode. 25 cd "contrib/xcscope" 26 27 mkdir -p "$out/libexec/cscope" 28 cp "cscope-indexer" "$out/libexec/cscope" 29 30 mkdir -p "$out/share/emacs/site-lisp" 31 emacs --batch --eval '(byte-compile-file "xcscope.el")' 32 cp xcscope.el{,c} "$out/share/emacs/site-lisp" 33 ''; 34 35 crossAttrs = { 36 postInstall = ""; 37 propagatedBuildInputs = [ ncurses.crossDrv ]; 38 }; 39 40 meta = { 41 description = "A developer's tool for browsing source code"; 42 43 longDescription = '' 44 Cscope is a developer's tool for browsing source code. It has 45 an impeccable Unix pedigree, having been originally developed at 46 Bell Labs back in the days of the PDP-11. Cscope was part of 47 the official AT&T Unix distribution for many years, and has been 48 used to manage projects involving 20 million lines of code! 49 ''; 50 51 license = "BSD-style"; 52 53 homepage = http://cscope.sourceforge.net/; 54 55 maintainers = with stdenv.lib.maintainers; [viric]; 56 57 platforms = with stdenv.lib.platforms; linux; 58 }; 59}