From a48ef6982463206c95a07cdc4e3fc583e9ec5358 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Wed, 1 May 2024 17:02:26 +0200 Subject: [PATCH] emacs.pkgs.tree-sitter-langs: use stdenv.hostPlatform for sharedLibrary suffix --- .../manual-packages/tree-sitter-langs/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/tree-sitter-langs/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/tree-sitter-langs/default.nix index cb4cec172bac..f8a0ec28a3a2 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/tree-sitter-langs/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/tree-sitter-langs/default.nix @@ -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