git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit2dc6e411476462a3f22664fe256ce5b7fc1dcead authorNicolas Dudebout <nicolas.dudebout@gmail.com> dateFri 16 Sep 2016, 20:57 (10 years ago) parent03ae872
1 file changed+5−4
pkgs/development/tools/misc/cscope/default.nix+5−4
pkgs/development/tools/misc/cscope/default.nix+5−4
@@ -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" \