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.
This commit is contained in:
Nicolas Dudebout 2016-09-16 20:55:24 -04:00
parent c8d4f40dc6
commit 03ae8729d4
1 changed files with 5 additions and 7 deletions

View File

@ -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"