diff --git a/.emacs.d/lisp/init-sly.el b/.emacs.d/lisp/init-sly.el index 36908a65..39e2df89 100644 --- a/.emacs.d/lisp/init-sly.el +++ b/.emacs.d/lisp/init-sly.el @@ -25,8 +25,20 @@ This dump is expected to be generated by `lisp-repl-core-dumper'." ;; Warning: ,restart-lisp does not take changes into account, the buffer must be re-created. ;; TODO: SLY: Add pre-inst-env SBCL, maybe ask for packages? (setq sly-lisp-implementations - (let ((maybe-core-dumper (when-let ((exec (executable-find "lisp-repl-core-dumper"))) - (list exec)))) + (let* ((maybe-core-dumper (when-let ((exec (executable-find "lisp-repl-core-dumper"))) + (list exec))) + ;; Support for encrypted files and password manager: + (nyxt-ad-hoc-deps '("password-store" "gnupg")) + (nyxt-command `("guix" "environment" "--pure" + "--preserve=^PERSONAL$" ; To find personal config, like engines and bookmarks. + "-l" ,(expand-file-name "~/common-lisp/nyxt/build-scripts/guix.scm") + ;; glib is needed to export GIO_EXTRA_MODULES. + "--ad-hoc" "glib" + ;; Not necessary? + "glib-networking" "gsettings-desktop-schemas" + ,@nyxt-ad-hoc-deps + ;; "--" "sbcl" + ))) ;; TODO: Shouldn't lisp-repl-core-dumper include sb-sprof? Should SBCL ;; packages remain loadable? `((sbcl-ambrevar ("lisp-repl-core-dumper" "-g" "--non-interactive" @@ -35,67 +47,23 @@ This dump is expected to be generated by `lisp-repl-core-dumper'." "--eval" "(named-readtables:in-readtable ambrevar/syntax:syntax)")) (sbcl (,@maybe-core-dumper "sbcl")) (sbcl-failsafe ("sbcl")) - (sbcl-nyxt (lambda () (nyxt-make-guix-sbcl-for-nyxt "~/projects/nyxt" :preserve '("PERSONAL")))) - (sbcl-nyxt-pre-inst-env - (,(expand-file-name "~/projects/guix/pre-inst-env") - "guix" "environment" "-l" - ,(expand-file-name "~/common-lisp/nyxt/build-scripts/guix.scm") - ;; ,(format "--root=%s" (expand-file-name "~/.guix-temp-profiles/nyxt-pre-inst-env/nyxt-pre-inst-env")) - "--ad-hoc" "glib" "glib-networking" "gsettings-desktop-schemas" - "--" "sbcl")) + (sbcl-nyxt (lambda () + (nyxt-make-guix-sbcl-for-nyxt "~/projects/nyxt" + :preserve '("PERSONAL") + :ad-hoc ',nyxt-ad-hoc-deps))) + (sbcl-nyxt-force (lambda () + (nyxt-make-guix-sbcl-for-nyxt "~/projects/nyxt" + :preserve '("PERSONAL") + :ad-hoc ',nyxt-ad-hoc-deps + :force t))) + (sbcl-nyxt-pre-inst-env ,(append + (list (expand-file-name "~/projects/guix/pre-inst-env")) + nyxt-command + '("--" "sbcl"))) ;; Simple REPL environment for Nyxt, in case sbcl-nyxt does not work. - (sbcl-nyxt-failsafe ("guix" "environment" "--pure" - "--preserve=^PERSONAL$" ; To find personal config, like engines and bookmarks. - "-l" ,(expand-file-name "~/common-lisp/nyxt/build-scripts/guix.scm") - ;; glib is needed to export GIO_EXTRA_MODULES. - "--ad-hoc" "glib" "glib-networking" "gsettings-desktop-schemas" - "gnupg" "--" "sbcl")) - (ccl-nyxt ("guix" "environment" "--pure" ; TODO: Convert Nyxt definition inputs? - "--preserve=^PERSONAL$" ; To find personal config, like engines and bookmarks. - ;; glib is needed to export GIO_EXTRA_MODULES. - "--ad-hoc" "ccl" "gnupg" "glib" "glib-networking" "gsettings-desktop-schemas" - "gcc-toolchain" ; For CFFI compilation - "cl-alexandria" - "cl-bordeaux-threads" - "cl-calispel" - "cl-chanl" - "cl-containers" - "cl-css" - "cl-custom-hash-table" - "cl-json" - "cl-markup" - "cl-ppcre" - "cl-prevalence" - "cl-closer-mop" - "cl-cluffer" - "cl-dexador" - "cl-enchant" - "cl-fset" - "cl-hu.dwim.defclass-star" - "cl-iolib" - "cl-local-time" - "cl-log4cl" - "cl-mk-string-metrics" - "cl-moptilities" - "cl-named-readtables" - "cl-osicat" - "cl-parenscript" - "cl-plump" - "cl-quri" - "cl-serapeum" - "cl-str" - "cl-slime-swank" - "cl-trivia" - "cl-trivial-clipboard" - "cl-trivial-features" - "cl-trivial-package-local-nicknames" - "cl-trivial-types" - "cl-unix-opts" - "cl-usocket" - "cl-cffi-gtk" - "cl-webkit" - "cl-gobject-introspection" - "--" "ccl")) + (sbcl-nyxt-failsafe ,(append nyxt-command '("--" "sbcl"))) + (ccl-nyxt ,(append nyxt-command '("ccl" "cl-osicat" ; Osicat is required by non-SBCL compilers. + "--" "ccl"))) (sbcl-nyxt-site ("guix" "environment" "--pure" "-m" ,(expand-file-name "~/common-lisp/nyxt-site/guix-manifest.scm") "--" "sbcl"))