From 2dc6e411476462a3f22664fe256ce5b7fc1dcead Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Fri, 16 Sep 2016 20:57:53 -0400 Subject: [PATCH] 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. --- pkgs/development/tools/misc/cscope/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix index 924277c53ed4..c5578e10abf1 100644 --- a/pkgs/development/tools/misc/cscope/default.nix +++ b/pkgs/development/tools/misc/cscope/default.nix @@ -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" \