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

luaPackages.tree-sitter-norg: init at 0.2.4-1 #309935

Merged
merged 1 commit into from
May 9, 2024

Conversation

mrcjkb
Copy link
Member

@mrcjkb mrcjkb commented May 7, 2024

Description of changes

This will soon be a dependency of neorg.
It is also a POC for packaging tree-sitter parsers with luarocks.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@mrcjkb
Copy link
Member Author

mrcjkb commented May 7, 2024

I also have tree-sitter-haskell working in one of my personal projects 🎉

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very cool !

LGTM

@mrcjkb
Copy link
Member Author

mrcjkb commented May 7, 2024

Result of nixpkgs-review pr 309935 run on x86_64-linux 1

10 packages built:
  • lua51Packages.luarocks-build-treesitter-parser
  • lua51Packages.tree-sitter-norg
  • lua52Packages.luarocks-build-treesitter-parser
  • lua52Packages.tree-sitter-norg
  • lua53Packages.luarocks-build-treesitter-parser
  • lua53Packages.tree-sitter-norg
  • lua54Packages.luarocks-build-treesitter-parser
  • lua54Packages.tree-sitter-norg
  • luajitPackages.luarocks-build-treesitter-parser
  • luajitPackages.tree-sitter-norg

@teto
Copy link
Member

teto commented May 7, 2024

seems like it needs fixing for darwin (or mark it broken). Hopefully this doesn't get picked up as a vimplugin because it's going to be confusing for users which grammar to install.

@mrcjkb
Copy link
Member Author

mrcjkb commented May 8, 2024

seems like it needs fixing for darwin (or mark it broken).

I'll look into fixing it later. I think we need to use the tree-sitter CLI and clang on Darwin.

Hopefully this doesn't get picked up as a vimplugin because it's going to be confusing for users which grammar to install.

I haven't added a vimPlugin for it.
nvim-treesitter have dropped tree-sitter-norg on main though 🤷

@teto
Copy link
Member

teto commented May 8, 2024

nvim-treesitter have dropped tree-sitter-norg on main though 🤷

and this is why the approach you take is the best !

I'll look into fixing it later. I think we need to use the tree-sitter CLI and clang on Darwin.

sounds not easy. I am fine with merging it as broken for darwin. You do a lot already, maybe let darwin users fix it ?

@mrcjkb
Copy link
Member Author

mrcjkb commented May 8, 2024

sounds not easy. I am fine with merging it as broken for darwin. You do a lot already, maybe let darwin users fix it ?

luarocks-build-treesitter-parser will try to use the new tree-sitter build command if it detects a tree-sitter CLI installation,
so it shouldn't be too hard to get it working.

I've just pushed a change that ought to fix it for darwin 🤞

@mrcjkb mrcjkb force-pushed the tree-sitter-norg branch 2 times, most recently from bf9a3f5 to 290b928 Compare May 9, 2024 00:17
@mrcjkb
Copy link
Member Author

mrcjkb commented May 9, 2024

🤔 no idea how it works on Darwin in the other luarocks-build-treesitter-parser workflow, but not here.
Guess I'll have to mark it as broken for now...

@teto teto merged commit e8f3c74 into NixOS:master May 9, 2024
24 of 25 checks passed
@mrcjkb mrcjkb deleted the tree-sitter-norg branch May 9, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants