about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/cscope
diff options
context:
space:
mode:
authorNicolas Dudebout <nicolas.dudebout@gmail.com>2016-09-16 20:55:24 -0400
committerNicolas Dudebout <nicolas.dudebout@gmail.com>2016-09-18 09:22:27 -0400
commit03ae8729d469c2252f17ef7af2bff029f07f98ce (patch)
tree7e726080aaaccdd14e2d4c59d502363e829c9129 /pkgs/development/tools/misc/cscope
parentc8d4f40dc6411fe68c3f5108ccf351386db0e1f0 (diff)
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.
Diffstat (limited to 'pkgs/development/tools/misc/cscope')
-rw-r--r--pkgs/development/tools/misc/cscope/default.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix
index 4685787af5f73..924277c53ed43 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"