From 2695a0521d3ed9bdd1b4a4aec74933bb6b535ccd Mon Sep 17 00:00:00 2001 From: karitham Date: Fri, 5 Jun 2026 08:56:03 +0200 Subject: [PATCH] helix: override rpmspec grammar src The pinned rev in helix's languages.toml doesn't resolve on the upstream repo, and recent revs moved parser.c into a rpmspec/ subdir. Pin to the last rev with the original src/ layout. --- modules/dev/editor/helix.nix | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/dev/editor/helix.nix b/modules/dev/editor/helix.nix index 244b073..a60cdc3 100644 --- a/modules/dev/editor/helix.nix +++ b/modules/dev/editor/helix.nix @@ -43,10 +43,30 @@ lib.mkIf osConfig.dev.editor.enable { enable = true; defaultEditor = true; - package = inputs'.helix.packages.helix.overrideAttrs { - pname = "helix-steel"; - cargoBuildFeatures = [ "steel" ]; - }; + package = + (inputs'.helix.packages.helix.override { + # The pinned rev for tree-sitter-rpmspec in helix's languages.toml no + # longer resolves on the upstream repo, and the latest revs moved + # parser.c into a rpmspec/ subdir that the helix grammar build + # doesn't understand. Pin to the last rev with the original layout. + grammarOverlays = [ + (final: prev: { + rpmspec = prev.rpmspec.overrideAttrs (_: { + src = builtins.fetchTree { + type = "git"; + url = "https://gitlab.com/cryptomilk/tree-sitter-rpmspec"; + rev = "7510373ef3384af3d083cdbed93c930bd8b77541"; + ref = "HEAD"; + shallow = true; + }; + }); + }) + ]; + }).overrideAttrs + { + pname = "helix-steel"; + cargoBuildFeatures = [ "steel" ]; + }; plugins = with inputs.helix-plugins.plugins; [ fake-warp ]; -- 2.51.2