emacs.pkgs.tree-sitter-langs: use stdenv.hostPlatform for sharedLibrary suffix

This commit is contained in:
Alexis Hildebrandt 2024-05-01 17:02:26 +02:00
parent b4df506a48
commit a48ef69824

View File

@ -16,9 +16,8 @@
let
inherit (melpaStablePackages) tree-sitter-langs;
libSuffix = if stdenv.isDarwin then "dylib" else "so";
langName = g: lib.removeSuffix "-grammar" (lib.removePrefix "tree-sitter-" g.pname);
soName = g: langName g + "." + libSuffix;
soName = g: langName g + stdenv.hostPlatform.extensions.sharedLibrary;
grammarDir = runCommand "emacs-tree-sitter-grammars" {
# Fake same version number as upstream language bundle to prevent triggering runtime downloads