summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2021-09-14 15:23:31 -0400
committerGitHub <noreply@github.com>2021-09-14 15:23:31 -0400
commit9b57dc35856d2d6c95b33d9c6da212590555400b (patch)
treee63660ee033e60a3aa29d7a60dcaa796f1fcd676
parentMerge pull request #137835 from r-ryantm/auto-update/libatomic_ops (diff)
parenttree-sitter: replace hyphens with underscores in .withPlugins (diff)
downloadnixpkgs-9b57dc35856d2d6c95b33d9c6da212590555400b.tar.gz
Merge pull request #136367 from LavaDesu/tsgrammar-fix
tree-sitter: replace hyphens with underscores in .withPlugins
-rw-r--r--pkgs/development/tools/parsing/tree-sitter/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix
index 60704fdd780b..0b38d1d8e267 100644
--- a/pkgs/development/tools/parsing/tree-sitter/default.nix
+++ b/pkgs/development/tools/parsing/tree-sitter/default.nix
@@ -90,8 +90,9 @@ let
in
{
name =
- (lib.strings.removePrefix "tree-sitter-"
- (lib.strings.removeSuffix "-grammar" name))
+ (lib.strings.replaceStrings ["-"] ["_"]
+ (lib.strings.removePrefix "tree-sitter-"
+ (lib.strings.removeSuffix "-grammar" name)))
+ stdenv.hostPlatform.extensions.sharedLibrary;
path = "${drv}/parser";
}