summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-common.nix
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2016-09-12 10:13:01 +0200
committerPeter Simons <simons@cryp.to>2016-09-12 11:28:58 +0200
commit4da51ec63766742a51d81f1451894d9dcb7e4cfa (patch)
tree13ca43393190f07955317d6566f11c63b2aa6046 /pkgs/development/haskell-modules/configuration-common.nix
parent4659e2d54b24cb2ebc16dfe3972af31479aa5080 (diff)
downloadnixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar.gz
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar.bz2
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar.lz
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar.xz
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.tar.zst
nixpkgs-4da51ec63766742a51d81f1451894d9dcb7e4cfa.zip
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.
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 1b02e464c3b..42734e08cd3 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -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" )