Merge pull request #308305 from afh/use-extensions-sharedLibrary

emacs.pkgs.tree-sitter-langs: use stdenv.hostPlatform for sharedLibrary suffix
This commit is contained in:
Lin Jian 2024-05-02 13:54:50 +08:00 committed by GitHub
commit 3ceb8981a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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