diff options
| author | Aaron1371 <aaron.boyd.org@gmail.com> | 2025-09-28 15:33:00 -0600 |
|---|---|---|
| committer | Cayetano Santos <csantosb@inventati.org> | 2026-01-29 20:13:26 +0100 |
| commit | bc8adbc9b2a49fed423a0ebb7a2e921e8172ccb1 (patch) | |
| tree | 9a2bccd95c70ad29497735406802f4d78a9134fc /gnu/packages/lua.scm | |
| parent | 147767904e828371e17f8a2900150c313491dee0 (diff) | |
gnu: Add fennel-ls.
* gnu/packages/lua.scm (fennel-ls): New variable.
Merges guix/guix!1267
Change-Id: I1f0c494f770a104e866e4dbecb6f19d78cd19366
Signed-off-by: Cayetano Santos <csantosb@inventati.org>
Diffstat (limited to 'gnu/packages/lua.scm')
| -rw-r--r-- | gnu/packages/lua.scm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 20e091918ff..fe6d09f5dff 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -68,6 +68,7 @@ | |||
| 68 | #:use-module (gnu packages gperf) | 68 | #:use-module (gnu packages gperf) |
| 69 | #:use-module (gnu packages gnupg) | 69 | #:use-module (gnu packages gnupg) |
| 70 | #:use-module (gnu packages gtk) | 70 | #:use-module (gnu packages gtk) |
| 71 | #:use-module (gnu packages haskell-xyz) | ||
| 71 | #:use-module (gnu packages libevent) | 72 | #:use-module (gnu packages libevent) |
| 72 | #:use-module (gnu packages libffi) | 73 | #:use-module (gnu packages libffi) |
| 73 | #:use-module (gnu packages linux) | 74 | #:use-module (gnu packages linux) |
| @@ -1716,3 +1717,67 @@ This compiler does the opposite of what the Fennel compiler does.") | |||
| 1716 | "Fnlfmt is a tool for automatically formatting Fennel code in a consistent | 1717 | "Fnlfmt is a tool for automatically formatting Fennel code in a consistent |
| 1717 | way, following established lisp conventions.") | 1718 | way, following established lisp conventions.") |
| 1718 | (license license:lgpl3+))) | 1719 | (license license:lgpl3+))) |
| 1720 | |||
| 1721 | (define-public fennel-ls | ||
| 1722 | (package | ||
| 1723 | (name "fennel-ls") | ||
| 1724 | (version "0.2.3") | ||
| 1725 | (source | ||
| 1726 | (origin | ||
| 1727 | (method git-fetch) | ||
| 1728 | (uri (git-reference | ||
| 1729 | (url "https://git.sr.ht/~xerool/fennel-ls") | ||
| 1730 | (commit version))) | ||
| 1731 | (file-name (git-file-name name version)) | ||
| 1732 | (sha256 | ||
| 1733 | (base32 "1fyyd6yg8xrb572hvk76yi9ga1ysrn6j40phf8ickav3s28i4k85")))) | ||
| 1734 | (build-system gnu-build-system) | ||
| 1735 | (arguments | ||
| 1736 | (list | ||
| 1737 | #:make-flags #~(list "VENDOR=false") | ||
| 1738 | #:tests? #f ; tests require additional dependencies | ||
| 1739 | #:phases | ||
| 1740 | #~(let ((luajit-major+minor | ||
| 1741 | #$(version-major+minor (package-version lua)))) | ||
| 1742 | (modify-phases %standard-phases | ||
| 1743 | (delete 'configure) | ||
| 1744 | (add-before 'build 'rm-vendored-deps | ||
| 1745 | (lambda _ | ||
| 1746 | (delete-file-recursively "fennel") | ||
| 1747 | (delete-file-recursively "deps/"))) | ||
| 1748 | (add-before 'build 'set-lua-path | ||
| 1749 | (lambda _ | ||
| 1750 | (setenv "LUA_PATH" | ||
| 1751 | (string-join | ||
| 1752 | (list | ||
| 1753 | (string-append | ||
| 1754 | #$fennel "/share/lua/" luajit-major+minor "/?.lua") | ||
| 1755 | (string-append | ||
| 1756 | #$dkjson "/share/lua/" luajit-major+minor "/?.lua") | ||
| 1757 | "?.lua") | ||
| 1758 | ";")))) | ||
| 1759 | (replace 'install | ||
| 1760 | (lambda _ | ||
| 1761 | (install-file "fennel-ls" | ||
| 1762 | (string-append #$output "/bin")))) | ||
| 1763 | (add-after 'install 'wrap | ||
| 1764 | (lambda _ | ||
| 1765 | (wrap-program (string-append #$output "/bin/fennel-ls") | ||
| 1766 | `("LUA_PATH" ";" suffix | ||
| 1767 | (,(string-append | ||
| 1768 | #$fennel | ||
| 1769 | "/share/lua/" | ||
| 1770 | luajit-major+minor | ||
| 1771 | "/?.lua") | ||
| 1772 | ,(string-append | ||
| 1773 | #$dkjson | ||
| 1774 | "/share/lua/" | ||
| 1775 | luajit-major+minor | ||
| 1776 | "/?.lua")))))))))) | ||
| 1777 | (inputs (list bash-minimal lua fennel pandoc dkjson)) | ||
| 1778 | (synopsis "Language server for Fennel") | ||
| 1779 | (description | ||
| 1780 | "Fennel Language Server is a language server for the Fennel programming | ||
| 1781 | language.") | ||
| 1782 | (home-page "https://git.sr.ht/~xerool/fennel-ls") | ||
| 1783 | (license license:expat))) | ||
