13 Commits

Author SHA1 Message Date
Ross Smyth
3dadd82c89 nix: Remove debug ls -al (#14320) 2025-08-26 17:19:41 -04:00
bloxx12
9bb370c91e chore: clean up grammars.nix (#13506) 2025-05-10 07:58:48 -05:00
Christopher Smyth
1d453785e5 Clean up Nix Flake & make it easier to customize (#12831) 2025-03-04 10:23:28 -06:00
Viktor Szépe
e22bbf5489 Fix typos (#12690) 2025-02-02 18:58:29 -06:00
Sebastian Zivota
a0b02106c3 Make nix flake respect unused grammars (#9326)
* Make nix flake respect unused grammars

* Use default value

* Refactor

* Take use-grammars.only into account

---------

Co-authored-by: Sebastian Zivota <sebastian.zivota@mailbox.org>
2024-01-14 15:11:40 +01:00
mydumpfire
6ab774da0b grammars.nix: allow the user to apply overlays (#8749)
You can now apply overlays to the grammar derivations via
`grammarOverlays`. Also, the `src` in the derivation is now properly
unpacked to the build directory, allowing the user to mutate the source
files if they want to.
2023-11-09 09:56:57 +01:00
Erin Kim
bdc7b35214 nix: replace runCommandNoCC with runCommand (#3992) 2022-09-27 08:01:58 -05:00
Yusuf Bera Ertan
85a5df0391 build(nix): add a way to override what grammars get built (#3141) 2022-07-27 12:52:07 -05:00
Yusuf Bera Ertan
bb83ea8393 chore(nix): format nix files with alejandra, update deps, minor code refactors (#2683) 2022-06-06 14:24:52 -05:00
Max
4eed4c26e9 Use fromTOML on Nix >= 2.6.0 (#1892) 2022-03-30 11:28:05 -05:00
Max
b63b37d5a0 grammars.nix: use github type for fetchTree where possible (#1872) 2022-03-28 16:50:18 -05:00
Michael Davis
e01c53551d flake: use builtins.fetchTree to shallow-clone grammar repos
Here we perform a shallow fetch using builtins.fetchTree. In order
to make this work, we need to specify the `ref' for any repository
that doesn't have `master' as its default branch (I'm not sure why
this limitation exists since we don't need this when performing
the shallow fetch in `--grammar build')

This `ref' field is ignored by helix, so I have left it undocumented
for now, but I could be open to documenting it.
2022-03-10 17:31:57 +09:00
Michael Davis
37520f46ae fetch and build grammars with nix in flake
This commit replaces the out-of-date builder in the flake which relied
on submodules for fetching and the compiler for building. Now we
disable fetching and building explicitly with the environment variable
and then use builtins.fetchGit and a derivation mostly derived from
upstream to compile the grammars.

Anecdotally, this is still quite slow as builtins.fetchGit does not
seem to do shallow clones. I'm not sure I see a way around it though
without recording sha256s, which seems cumbersome.
2022-03-10 17:31:57 +09:00