From 13024a48a37615de50454e9a611423b25fbe170d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 18 Aug 2015 01:21:18 +0200 Subject: [PATCH] haskell-ghc-mode: byte-compile installed elisp code --- .../haskell-modules/configuration-common.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6439286ca13..e2edcde9efe 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -401,7 +401,6 @@ self: super: { ghc-events-parallel = dontCheck super.ghc-events-parallel; # http://hydra.cryp.to/build/496828/log/raw ghcid = dontCheck super.ghcid; ghc-imported-from = dontCheck super.ghc-imported-from; - ghc-mod = dontCheck super.ghc-mod; # http://hydra.cryp.to/build/499674/log/raw ghc-parmake = dontCheck super.ghc-parmake; gitlib-cmdline = dontCheck super.gitlib-cmdline; git-vogue = dontCheck super.git-vogue; @@ -939,4 +938,18 @@ self: super: { # https://github.com/lens/lens-aeson/issues/18 lens-aeson = dontCheck super.lens-aeson; + # Byte-compile elisp code for Emacs. + ghc-mod = overrideCabal super.ghc-mod (drv: { + preCheck = "export HOME=$TMPDIR"; + testToolDepends = drv.testToolDepends or [] ++ [self.cabal-install]; + doCheck = false; # https://github.com/kazu-yamamoto/ghc-mod/issues/335 + executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.emacs]; + postInstall = '' + local lispdir=( "$out/share/"*"-${self.ghc.name}/${drv.pname}-${drv.version}/elisp" ) + make -C $lispdir + mkdir -p $out/share/emacs/site-lisp + ln -s "$lispdir/"*.el{,c} $out/share/emacs/site-lisp/ + ''; + }); + }