@@ -1,29 +1,28 @@
1−{ fetchurl, stdenv, ncurses, pkgconfig, emacs}:
1+{ fetchurl, stdenv, ncurses
2+, emacsSupport ? true, emacs
3+}:
24
35stdenv.mkDerivation rec {
4− name = "cscope-15.8a";
6+ name = "cscope-15.8b";
57
68 src = fetchurl {
79 url = "mirror://sourceforge/cscope/${name}.tar.gz";
8− sha256 = "07jdhxvp3dv7acvp0pwsdab1g2ncxjlcf838lj7vxgjs1p26lwzb";
10+ sha256 = "1byk29rcpyygrnr03h5j3y8j0aqxldd9dr5ihi9q982sy28x12a8";
911 };
1012
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−
1813 configureFlags = "--with-ncurses=${ncurses.dev}";
1914
2015 buildInputs = [ ncurses ];
21− nativeBuildInputs = [ pkgconfig emacs ];
16+ nativeBuildInputs = stdenv.lib.optional emacsSupport emacs;
2217
23− postInstall = ''
24− # Install Emacs mode.
18+ postInstall = stdenv.lib.optionalString emacsSupport ''
2519 cd "contrib/xcscope"
2620
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";
25+
2726 mkdir -p "$out/libexec/cscope"
2827 cp "cscope-indexer" "$out/libexec/cscope"
2928