Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grammars.nix: allow the user to apply overlays #8749

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

mydumpfire
Copy link
Contributor

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.

Example usage:

helix.override {
  grammarOverlays = [
    (final: prev: {
      markdown_inline = prev.markdown_inline.overrideAttrs {
        EXTENSION_TAGS = 1;
        EXTENSION_WIKI_LINK = 1;
        nativeBuildInputs = with pkgs; [ tree-sitter nodejs ];
        preBuild = ''
          rm src/parser.c
          tree-sitter generate
        '';
      };
    })
  ];
}

This builds the markdown_inline parser with optional extensions enabled.

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.
@the-mikedavis the-mikedavis added A-packaging Area: Packaging and bundling S-waiting-on-review Status: Awaiting review from a maintainer. labels Nov 7, 2023
@pascalkuthe pascalkuthe merged commit 6ab774d into helix-editor:master Nov 9, 2023
6 checks passed
danillos pushed a commit to danillos/helix that referenced this pull request Nov 21, 2023
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.
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
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.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
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.
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
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.
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants