@@ -1,4 +1,6 @@
1−{ fetchurl, stdenv, ncurses, pkgconfig, emacs}:
1+{ fetchurl, stdenv, ncurses, pkgconfig
2+, emacsSupport ? true, emacs
3+}:
24
35stdenv.mkDerivation rec {
46 name = "cscope-15.8a";
@@ -11,10 +13,9 @@ stdenv.mkDerivation rec {
1113 configureFlags = "--with-ncurses=${ncurses.dev}";
1214
1315 buildInputs = [ ncurses ];
14− nativeBuildInputs = [ pkgconfig emacs ];
16+ nativeBuildInputs = [ pkgconfig ] + stdenv.lib.optional emacsSupport emacs;
1517
16− postInstall = ''
17− # Install Emacs mode.
18+ postInstall = stdenv.lib.optionalString emacsSupport ''
1819 cd "contrib/xcscope"
1920
2021 sed -i "cscope-indexer" \