main
 1{
 2  rustPlatform,
 3  fetchFromGitHub,
 4  fetchpatch,
 5  helix-unwrapped,
 6}:
 7helix-unwrapped.overrideAttrs (
 8  finalAttrs: _: {
 9    pname = "steelix-unwrapped";
10
11    version = "0-unstable-2026-07-18";
12
13    src = fetchFromGitHub {
14      owner = "mattwparas";
15      repo = "helix";
16      rev = "8d189f46e9c620baa685bdfbe39b7c95928475a0";
17      hash = "sha256-qYR2f+uSUNsJYbbwSo9bCB+LI7n3NzQDCHXJRmHztDg=";
18    };
19
20    cargoDeps = rustPlatform.fetchCargoVendor {
21      inherit (finalAttrs) src pname version;
22      hash = "sha256-Od52YBH5dc4/zvIY3DbptZyrj9Vci/xbWI7PmExXWeU=";
23    };
24
25    cargoBuildFlags = [
26      "--package"
27      "helix-term"
28      "--features"
29      "steel,git"
30    ];
31
32    # This fork is built from Helix master, whose loader expects tree-sitter
33    # grammars with the platform-native extension (`.dylib` on Darwin) since
34    # helix-editor/helix#14982. We reuse the grammars from `helix.runtime`, built
35    # from the last Helix *release*, which still names them `.so` on Darwin, so
36    # revert that commit to make the loader look for `.so`. Remove once a Helix
37    # release ships #14982 and nixpkgs' grammars switch to `.dylib`.
38    patches = [
39      (fetchpatch {
40        name = "revert-dylib-grammar-extension.patch";
41        url = "https://github.com/helix-editor/helix/commit/430914b298a32653ab1847fdfdf2177a002be04c.patch";
42        revert = true;
43        hash = "sha256-4KUFppkso4/XwNU+mGIgLvl+mJXHZWkmaguYMy8oTyI=";
44      })
45    ];
46
47    doInstallCheck = false;
48  }
49)