Hi, On Thu, 17 Dec 2020 at 05:59, pinoaffe <pinoa...@gmail.com> wrote:
> I've attached the reusable stuff in guix-profiles.el, and my personal > config in init-profiles.el. Thanks for sharing. > (defun guix-profiles->environment-vars (profiles) > (shell-command-to-string > (string-join (apply #'list > "guix" > "package" > "--search-paths" Instead of call shell command and then… > (defun guix-path-file->key-value (str) > (mapcar (lambda (line) > (let* ((lst (split-string line "=")) > (var (string-remove-prefix "export " (car lst))) > (val (string-trim (string-join (cdr lst) "=") "\"" > "\""))) > (cons var val))) > (split-string (string-trim-right str "\n") > "\n"))) …parse the output, you should give a look at how Emacs-Guix does using the Scheme API. Or maybe use “guix repl” as Nyxt does. Aside, it is a bit redundant with Emacs-Guix, from my understanding. :-) All the best, simon