3
0
Fork 0
forked from mirrors/nixpkgs

cscope: make emacs support optional

Other nixpkgs offer cscope-emacs integration and they use package.el to
register the package. When using such package, only the cscope binary is
required.
This commit is contained in:
Nicolas Dudebout 2016-09-16 20:57:53 -04:00
parent 03ae8729d4
commit 2dc6e41147

View file

@ -1,4 +1,6 @@
{ fetchurl, stdenv, ncurses, pkgconfig, emacs}:
{ fetchurl, stdenv, ncurses, pkgconfig
, emacsSupport ? true, emacs
}:
stdenv.mkDerivation rec {
name = "cscope-15.8a";
@ -11,10 +13,9 @@ stdenv.mkDerivation rec {
configureFlags = "--with-ncurses=${ncurses.dev}";
buildInputs = [ ncurses ];
nativeBuildInputs = [ pkgconfig emacs ];
nativeBuildInputs = [ pkgconfig ] + stdenv.lib.optional emacsSupport emacs;
postInstall = ''
# Install Emacs mode.
postInstall = stdenv.lib.optionalString emacsSupport ''
cd "contrib/xcscope"
sed -i "cscope-indexer" \