Function: ghostel--module-platform-tag
ghostel--module-platform-tag is a natively compiled function defined
in ghostel-module-install.el.
Signature
(ghostel--module-platform-tag)
Documentation
Return platform tag for the current system, e.g. "x86_64-linux".
Returns nil if the platform is not recognized.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-module-install.el
(defun ghostel--module-platform-tag ()
"Return platform tag for the current system, e.g. \"x86_64-linux\".
Returns nil if the platform is not recognized."
(let* ((raw-arch (car (split-string system-configuration "-")))
(arch (pcase raw-arch
("amd64" "x86_64")
("arm64" "aarch64")
(_ raw-arch)))
(os (cond
((eq system-type 'darwin) "macos")
;; Termux builds Emacs with an `*-linux-android' triple;
;; `system-type' is `android' there, but older Emacs
;; versions report `gnu/linux', so check both. Bionic
;; modules are not interchangeable with glibc ones.
((or (eq system-type 'android)
(string-match-p "android" system-configuration))
"android")
((eq system-type 'gnu/linux) "linux")
((eq system-type 'windows-nt) "windows")
(t nil))))
(when os
(format "%s-%s" arch os))))