mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 01:26:14 +01:00
aff0158ef7
Signed-off-by: magic_rb <magic_rb@redalder.org>
25 lines
584 B
Nix
25 lines
584 B
Nix
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
#
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
|
{lib, ...}: let
|
|
inherit
|
|
(lib)
|
|
strings
|
|
flip
|
|
;
|
|
in {
|
|
flake.overlays.tree-sitter-grammars = final: prev: {
|
|
tree-sitter-grammars =
|
|
prev.linkFarm "grammars"
|
|
(flip map (builtins.attrValues prev.tree-sitter.builtGrammars)
|
|
(
|
|
drv: let
|
|
name = strings.getName drv;
|
|
in {
|
|
name = "lib${strings.removeSuffix "-grammar" name}.so";
|
|
path = "${drv}/parser";
|
|
}
|
|
));
|
|
};
|
|
}
|