@@ -1,29 +1,28 @@
1−{ fetchurl, stdenv, ncurses, pkgconfig, emacs}:
1+{ fetchurl, stdenv, ncurses
2+, emacsSupport ? true, emacs
3stdenv.mkDerivation rec {
5stdenv.mkDerivation rec {
4− name = "cscope-15.8a";
6+ name = "cscope-15.8b";
6 src = fetchurl {
8 src = fetchurl {
7 url = "mirror://sourceforge/cscope/${name}.tar.gz";
9 url = "mirror://sourceforge/cscope/${name}.tar.gz";
8− sha256 = "07jdhxvp3dv7acvp0pwsdab1g2ncxjlcf838lj7vxgjs1p26lwzb";
10+ sha256 = "1byk29rcpyygrnr03h5j3y8j0aqxldd9dr5ihi9q982sy28x12a8";
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";
18 configureFlags = "--with-ncurses=${ncurses.dev}";
13 configureFlags = "--with-ncurses=${ncurses.dev}";
20 buildInputs = [ ncurses ];
15 buildInputs = [ ncurses ];
21− nativeBuildInputs = [ pkgconfig emacs ];
16+ nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
23− postInstall = ''
18+ postInstall = stdenv.lib.optionalString emacsSupport ''
24− # Install Emacs mode.
25 cd "contrib/xcscope"
19 cd "contrib/xcscope"
21+ sed -i "cscope-indexer" \
22+ -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g"
23+ sed -i "xcscope.el" \
24+ -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g";
27 mkdir -p "$out/libexec/cscope"
26 mkdir -p "$out/libexec/cscope"
28 cp "cscope-indexer" "$out/libexec/cscope"
27 cp "cscope-indexer" "$out/libexec/cscope"