structured-haskell-mode: link Haskell libraries statically into this executable

It's my understanding that Emacs runs the "structured-haskell-mode" binary
virtually every time you press a key in an Haskell buffer, and since
dynamically linked Haskell binaries take *much* longer to start up, switching
this particular package to statically linked libraries ought to result in a
performance boost.
This commit is contained in:
Peter Simons 2016-09-12 10:13:01 +02:00
parent 4659e2d54b
commit 4da51ec637

View file

@ -764,8 +764,12 @@ self: super: {
'';
});
# Byte-compile elisp code for Emacs.
# Fine-tune the build.
structured-haskell-mode = overrideCabal super.structured-haskell-mode (drv: {
# Statically linked Haskell libraries make the tool start-up much faster,
# which is important for use in Emacs.
enableSharedExecutables = false;
# Byte-compile elisp code for Emacs.
executableToolDepends = drv.executableToolDepends or [] ++ [pkgs.emacs];
postInstall = ''
local lispdir=( "$out/share/"*"-${self.ghc.name}/${drv.pname}-${drv.version}/elisp" )