From b779f54a3bff9bf44fb82849658c9ada021468a0 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Thu, 1 Jun 2023 19:23:13 +0900 Subject: [PATCH] Build with treeSitter on supported versions treeSitter attributes needs to be set to true in order to enable extra tree-sitter support by the Emacs wrapper. Changing the attribute triggers rebuild, so it should be set by default on all versions that support treesit. --- emacs.nix | 7 ++++++- overlay.nix | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/emacs.nix b/emacs.nix index dd8bcba..4a999cf 100644 --- a/emacs.nix +++ b/emacs.nix @@ -13,6 +13,7 @@ , gnutls , jansson , tree-sitter +, treeSitter ? false , gmp , sigtool ? null , autoconf ? null @@ -43,12 +44,16 @@ stdenv.mkDerivation rec { ++ lib.optionals srcRepo [ autoconf automake texinfo ]; buildInputs = - [ ncurses libxml2 gnutls gettext jansson tree-sitter gmp ] ++ lib.optionals stdenv.isDarwin [ sigtool ]; + [ ncurses libxml2 gnutls gettext jansson gmp ] ++ lib.optionals stdenv.isDarwin [ sigtool ] ++ lib.optional treeSitter tree-sitter; hardeningDisable = [ "format" ]; inherit patches; + passthru = { + inherit treeSitter; + }; + configureFlags = [ "--disable-build-details" # for a (more) reproducible build "--with-modules" diff --git a/overlay.nix b/overlay.nix index 5f363a4..af1a115 100644 --- a/overlay.nix +++ b/overlay.nix @@ -167,6 +167,7 @@ let version = "29.0.60"; srcRepo = true; withAutoReconf = true; + treeSitter = true; inherit (self.darwin) sigtool; }; @@ -175,6 +176,7 @@ let version = "30.0.50"; srcRepo = true; withAutoReconf = true; + treeSitter = true; inherit (self.darwin) sigtool; }; };