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

tree-sitter.builtGrammars: build parser libraries #81412

Merged
merged 1 commit into from Mar 6, 2020

Conversation

teto
Copy link
Member

@teto teto commented Feb 29, 2020

except for typescript that provokes an error.
These libraries can be used on neovim 0.5 for instance.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@teto
Copy link
Member Author

teto commented Mar 1, 2020

@GrahamcOfBorg build tree-sitter.builtGrammars

@teto
Copy link
Member Author

teto commented Mar 2, 2020

cc @Profpatsch

pkgs/development/tools/parsing/tree-sitter/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/parsing/tree-sitter/default.nix Outdated Show resolved Hide resolved
mkdir $out
'' + (lib.concatStrings (lib.mapAttrsToList
(name: grammar: "ln -s ${fetch grammar} $out/${name}\n")
(import ./grammars))));

builtGrammars = let
change = name: grammar:
callPackage ./library.nix { language = name; version = "placeholder"; source = fetch grammar;}
Copy link
Member

Choose a reason for hiding this comment

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

Let’s use the tree-sitter version here

Copy link
Member

Choose a reason for hiding this comment

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

It’s still "placeholder" as far as I can see

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry I messed up the commit. Fixed.

@teto teto force-pushed the treesitter_grammars branch 2 times, most recently from 840243b to 850eb1f Compare March 4, 2020 10:22
except for typescript that provokes an error.
These libraries can be used on neovim 0.5 for instance.
@Profpatsch
Copy link
Member

LGTM!

@Profpatsch Profpatsch merged commit 53ae5f7 into NixOS:master Mar 6, 2020
@teto teto deleted the treesitter_grammars branch September 24, 2023 15:49
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

2 participants