From 03ae8729d469c2252f17ef7af2bff029f07f98ce Mon Sep 17 00:00:00 2001 From: Nicolas Dudebout Date: Fri, 16 Sep 2016 20:55:24 -0400 Subject: [PATCH] cscope: do all emacs mode creation in postInstall One part of the emacs mode creation was done in preConfigure, and one in postInstall, but both could be done together. --- pkgs/development/tools/misc/cscope/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix index 4685787af5f..924277c53ed 100644 --- a/pkgs/development/tools/misc/cscope/default.nix +++ b/pkgs/development/tools/misc/cscope/default.nix @@ -8,13 +8,6 @@ stdenv.mkDerivation rec { sha256 = "07jdhxvp3dv7acvp0pwsdab1g2ncxjlcf838lj7vxgjs1p26lwzb"; }; - preConfigure = '' - sed -i "contrib/xcscope/cscope-indexer" \ - -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g" - sed -i "contrib/xcscope/xcscope.el" \ - -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g"; - ''; - configureFlags = "--with-ncurses=${ncurses.dev}"; buildInputs = [ ncurses ]; @@ -24,6 +17,11 @@ stdenv.mkDerivation rec { # Install Emacs mode. cd "contrib/xcscope" + sed -i "cscope-indexer" \ + -"es|^PATH=.*$|PATH=\"$out/bin:\$PATH\"|g" + sed -i "xcscope.el" \ + -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g"; + mkdir -p "$out/libexec/cscope" cp "cscope-indexer" "$out/libexec/cscope"