Merge pull request #101609 from 7c6f434c/nyxt-deps
lispPackages.nyxt: build a binary
This commit is contained in:
commit
61d82f08f7
@ -95,8 +95,8 @@ nix_lisp_run_single_form(){
|
||||
nix_lisp_build_system(){
|
||||
NIX_LISP_FINAL_PARAMETERS=(
|
||||
"$NIX_LISP_EXEC_CODE" "(progn
|
||||
(asdf:make :$1)
|
||||
(loop for s in (list $(for i in $3; do echo ":$i"; done)) do (asdf:make s)))"
|
||||
(asdf:load-system :$1)
|
||||
(loop for s in (list $(for i in $3; do echo ":$i"; done)) do (asdf:load-system s)))"
|
||||
"$NIX_LISP_EXEC_CODE" "(progn
|
||||
(setf (asdf/system:component-entry-point (asdf:find-system :$1)) ${2:-nil})
|
||||
#+cffi(setf cffi:*foreign-library-directories*
|
||||
@ -106,15 +106,19 @@ nix_lisp_build_system(){
|
||||
:separator \":\")
|
||||
for l in sb-alien::*shared-objects*
|
||||
for ns := (sb-alien::shared-object-namestring l)
|
||||
do (format *error-output* \"Searching alien object ~s in ~s~%\"
|
||||
ns libpath)
|
||||
do (and (> (length ns) 0) (not (equal (elt ns 0) \"/\"))
|
||||
(let*
|
||||
((prefix (find-if (lambda (s) (probe-file (format nil \"~a/~a\" s ns))) libpath))
|
||||
(fullpath (and prefix (format nil \"~a/~a\" prefix ns))))
|
||||
(when fullpath
|
||||
(format *error-output* \"Found: ~s~%\" fullpath)
|
||||
(setf
|
||||
(sb-alien::shared-object-namestring l) fullpath
|
||||
(sb-alien::shared-object-pathname l) (probe-file fullpath)))))
|
||||
)
|
||||
$4
|
||||
(asdf:perform (quote asdf:program-op) :$1)
|
||||
)")
|
||||
}
|
||||
|
@ -129,6 +129,19 @@ let lispPackages = rec {
|
||||
buildSystems = [ "nyxt" "nyxt-ext" ];
|
||||
|
||||
description = "Browser";
|
||||
|
||||
overrides = x: {
|
||||
postInstall = ''
|
||||
echo "Building nyxt binary"
|
||||
NIX_LISP_PRELAUNCH_HOOK='
|
||||
nix_lisp_build_system nyxt/gtk-application \
|
||||
"(asdf/system:component-entry-point (asdf:find-system :nyxt/gtk-application))" \
|
||||
"" "(format *error-output* \"Alien objects:~%~s~%\" sb-alien::*shared-objects*)"
|
||||
' "$out/bin/nyxt-lisp-launcher.sh"
|
||||
cp "$out/lib/common-lisp/nyxt/nyxt" "$out/bin/"
|
||||
'';
|
||||
};
|
||||
|
||||
deps = with pkgs.lispPackages; [
|
||||
alexandria
|
||||
bordeaux-threads
|
||||
|
Loading…
Reference in New Issue
Block a user