From 72361b82626d1d37956541552a4bb8bbd47cdbd9 Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Sun, 26 Dec 2021 21:24:23 +0000 Subject: [PATCH] helix: reenable haskell syntax highlighting support Haskell syntax highlighting is disabled in `helix-editor` by default. This is because of an issue compiling tree-sitter-haskell on M1 macs, as its default compiler doesn't support c++14. As we're using a nix-derived toolchain, we shouldn't be subject to this problem. See [this comment](https://github.com/helix-editor/helix/issues/1384#issuecomment-1001240194) for more info. --- pkgs/applications/editors/helix/default.nix | 4 ++++ .../editors/helix/patches/reenable-haskell.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/applications/editors/helix/patches/reenable-haskell.patch diff --git a/pkgs/applications/editors/helix/default.nix b/pkgs/applications/editors/helix/default.nix index c0c8e2a57b363..42cf29fd23eec 100644 --- a/pkgs/applications/editors/helix/default.nix +++ b/pkgs/applications/editors/helix/default.nix @@ -16,6 +16,10 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ makeWrapper ]; + patches = [ + ./patches/reenable-haskell.patch + ]; + postInstall = '' mkdir -p $out/lib cp -r runtime $out/lib diff --git a/pkgs/applications/editors/helix/patches/reenable-haskell.patch b/pkgs/applications/editors/helix/patches/reenable-haskell.patch new file mode 100644 index 0000000000000..c8bfe104e522f --- /dev/null +++ b/pkgs/applications/editors/helix/patches/reenable-haskell.patch @@ -0,0 +1,13 @@ +diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs +index 28f85e7..bad1c6b 100644 +--- a/helix-syntax/build.rs ++++ b/helix-syntax/build.rs +@@ -175,7 +175,7 @@ fn build_dir(dir: &str, language: &str) { + fn main() { + let ignore = vec![ + "tree-sitter-typescript".to_string(), +- "tree-sitter-haskell".to_string(), // aarch64 failures: https://github.com/tree-sitter/tree-sitter-haskell/issues/34 ++ // "tree-sitter-haskell".to_string(), // aarch64 failures: https://github.com/tree-sitter/tree-sitter-haskell/issues/34 + "tree-sitter-ocaml".to_string(), + ]; + let dirs = collect_tree_sitter_dirs(&ignore).unwrap();