fix: update helix-git

This commit is contained in:
Jan-Bulthuis committed 2026-11-18 12:24:02 +01:00
1 parent 02e738d0b4
commit 2d6a7329ac
2 files changed
+3671 -5

No files matched your search

+32 -4
View File
@@ -4,6 +4,8 @@
rustPlatform, rustPlatform,
helix, helix,
helix-unwrapped, helix-unwrapped,
tree-sitter,
pkgs,
}: }:
# Helix from git, built with nixpkgs' packaging instead of the upstream flake. The # Helix from git, built with nixpkgs' packaging instead of the upstream flake. The
@@ -13,6 +15,8 @@
# To update: change rev and hash, set cargoHash to lib.fakeHash, build and copy the # To update: change rev and hash, set cargoHash to lib.fakeHash, build and copy the
# expected hash, then run ./update-grammars.sh. # expected hash, then run ./update-grammars.sh.
let let
lockedGrammars = lib.importJSON ./grammars.json;
unwrapped = helix-unwrapped.overrideAttrs ( unwrapped = helix-unwrapped.overrideAttrs (
final: prev: { final: prev: {
version = "25.07.1-unstable-${final.src.rev}"; version = "25.07.1-unstable-${final.src.rev}";
@@ -25,9 +29,8 @@ let
}; };
cargoDeps = rustPlatform.fetchCargoVendor { cargoDeps = rustPlatform.fetchCargoVendor {
inherit (final) src; inherit (final) src pname version;
name = "${final.pname}-${final.version}-vendor"; hash = "sha256-oo59HhwOS3EeV/YI+NWirEkdzD9pzMot2lgphZeOxfc=";
hash = lib.fakeHash;
}; };
# The mdbook 0.5 patch from nixpkgs targets the release # The mdbook 0.5 patch from nixpkgs targets the release
@@ -45,6 +48,31 @@ let
in in
(helix.override { (helix.override {
helix-unwrapped = unwrapped; helix-unwrapped = unwrapped;
lockedGrammars = lib.importJSON ./grammars.json; inherit lockedGrammars;
grammarsOverlay = lib.composeManyExtensions [
# Keep nixpkgs' fixes for its pinned grammars
helix.defaultGrammarsOverlay
(final: prev: {
# The tree-sitter.json fix is already included upstream
tree-sitter-tlaplus = prev.tree-sitter-tlaplus.overrideAttrs { patches = [ ]; };
})
# Grammars Helix uses that nixpkgs doesn't package yet
(
final: prev:
lib.mapAttrs' (
name: grammar:
lib.nameValuePair "tree-sitter-${name}" (
lib.makeOverridable tree-sitter.buildGrammar {
language = name;
version = lib.sources.shortRev grammar.nurl.args.rev;
src = pkgs.${grammar.nurl.fetcher} grammar.nurl.args;
location = grammar.subpath;
}
)
) (lib.filterAttrs (name: _: !(prev ? "tree-sitter-${name}")) lockedGrammars)
)
];
}).overrideAttrs }).overrideAttrs
{ passthru.unwrapped = unwrapped; } { passthru.unwrapped = unwrapped; }
File diff suppressed because it is too large. Load diff