From d126fbb89c6a92d89b9357095fe09213d856e2bd Mon Sep 17 00:00:00 2001
From: Peter Simons <simons@cryp.to>
Date: Mon, 26 Sep 2016 08:41:42 +0200
Subject: [PATCH] hindent: don't try to byte compile elisp files

We don't have an up-to-date version of haskell-mode in Nix, which is a
dependency of that build.
---
 .../haskell-modules/configuration-common.nix         | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 6afcfa93c92d..edf649f17158 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -800,18 +800,12 @@ self: super: {
     haskell-src-exts = self.haskell-src-exts_1_18_2;
   };
 
-  # Byte-compile elisp code for Emacs.
+  # # Make elisp files available at a location where people expect it.
   hindent = overrideCabal super.hindent (drv: {
-    executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.emacs];
+    # We cannot easily byte-compile these files, unfortunately, because they
+    # depend on a new version of haskell-mode that we don't have yet.
     postInstall = ''
       local lispdir=( "$out/share/"*"-${self.ghc.name}/${drv.pname}-${drv.version}/elisp" )
-      pushd >/dev/null $lispdir
-      for i in *.el; do
-        emacs -Q -L . -L ${pkgs.emacsPackages.haskellMode}/share/emacs/site-lisp \
-          --batch --eval "(byte-compile-disable-warning 'cl-functions)" \
-          -f batch-byte-compile $i
-      done
-      popd >/dev/null
       mkdir -p $out/share/emacs
       ln -s $lispdir $out/share/emacs/site-lisp
     '';