Replies: 6 comments 3 replies
-
Guix build for terminal.cReference: comment on build invocation of terminal.c in Guix. Thanks @jgarte. Dockerfile build for terminal.cComparing the previous to the equivalent build invocation as documented in the Dockerfile: I note that Guix does not compile a static library. TODO: Decision on static vs dynamic shared library |
Beta Was this translation helpful? Give feedback.
-
Contributed lisp build snippet for terminal.soThe path is hardcoded to ;; thanks to April & May on Discord
(let* ((source (asdf:system-relative-pathname :lem-terminal "terminal.c"))
(lib (asdf:system-relative-pathname
:lem-terminal (format nil
"~(lib/~A/~A/terminal.so~)"
(uiop:operating-system)
(uiop:architecture)))))
(unless (probe-file lib)
(ensure-directories-exist lib)
#+darwin
(uiop:run-program (format nil "cc ~A -I/opt/homebrew/include -L/opt/homebrew/lib -lvterm -o ~A -shared -fPIC"
source lib))
#-darwin
(uiop:run-program (format nil "cc ~A -lvterm -o ~A -shared -fPIC" source lib))))=> |
Beta Was this translation helpful? Give feedback.
-
Nix build framework for lemReference: #2019 Important comment by @tani:
TODO: List the build steps from |
Beta Was this translation helpful? Give feedback.
-
Nix Build Script: build-lem.lispReference: Lines 30 to 48 in 6d259d0 The heavy lifting is all done by |
Beta Was this translation helpful? Give feedback.
-
lem-project/webviewThe lem webview library is currently modeled similarly to the basic example of upstream webview. The main difference is that the CMake file builds a library instead of an executable. FetchContentThe upstream project source is implicitly fetched through CMake main.cThe main.c is only a placeholder for the upstream header file. Since there is no new C or C++ code contained within, we can probably compile the upstream webview code directly as a shared Alternative webview shared library buildWe can also build a shared library directly from the upstream webview source code with the following If the resulting |
Beta Was this translation helpful? Give feedback.
-
|
For terminal.so, cffi already ships with some c toolchain support that can build this at deployment time. It might be simplest to just use that for c libraries included with Lem. For external deps like libwebview it's best just to trigger the build system they ship with (e.g. cmake). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This Ideas thread aims to collect all the discussions concerning packaging of lem using the standard GNU Build System: Autoconf, Automake and Libtool. The discussion aims to incorporate the clean build logic encapsulated in recent
flake.nixcommits. Ideas from packaging of lem in Guix will also be considered. Contributions from packaging for FreeBSD and OpenBSD are also strongly encouraged.Background
2025-09-16
Commit be73d0d: Add terminal.so
@jgarte: Hi @Sasanidas @vindarel, what do you think if instead we have a
Makefilethat would build this binary instead of including a binary directly that we don't know how it was compiled?2025-09-18
PR #1964: Remove binary files
@mldulaney: Open source software should, by definition, not be distributing binary files. Given the xz backdoor, these increase distrust.
Continuing the discussion below.
Beta Was this translation helpful? Give feedback.
All reactions