fix: update helix-git
This commit is contained in:
2 files changed
+3671
-5
No files matched your search
@@ -4,6 +4,8 @@
|
||||
rustPlatform,
|
||||
helix,
|
||||
helix-unwrapped,
|
||||
tree-sitter,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
# 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
|
||||
# expected hash, then run ./update-grammars.sh.
|
||||
let
|
||||
lockedGrammars = lib.importJSON ./grammars.json;
|
||||
|
||||
unwrapped = helix-unwrapped.overrideAttrs (
|
||||
final: prev: {
|
||||
version = "25.07.1-unstable-${final.src.rev}";
|
||||
@@ -25,9 +29,8 @@ let
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit (final) src;
|
||||
name = "${final.pname}-${final.version}-vendor";
|
||||
hash = lib.fakeHash;
|
||||
inherit (final) src pname version;
|
||||
hash = "sha256-oo59HhwOS3EeV/YI+NWirEkdzD9pzMot2lgphZeOxfc=";
|
||||
};
|
||||
|
||||
# The mdbook 0.5 patch from nixpkgs targets the release
|
||||
@@ -45,6 +48,31 @@ let
|
||||
in
|
||||
(helix.override {
|
||||
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
|
||||
{ passthru.unwrapped = unwrapped; }
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user