help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configuring geiser for load paths of Guix environment


From: Olivier Dion
Subject: Configuring geiser for load paths of Guix environment
Date: Mon, 01 Aug 2022 12:24:24 -0400

Hi,

Say I have a .guix.scm in my project with something like
(specifications->manifest (list "guile" "guile-fibers" "guile-gcrypt"))

If I want to develop with Geiser, it needs to find these modules in its
load paths.  My solution to this problem is the following .geiser at the
project root:

--8<---------------cut here---------------start------------->8---
;; -*-Scheme-*-
(let* ((port ((@@ (ice-9 popen) open-input-pipe)
              "guix shell -m .guix.scm -- /bin/sh -c 'echo $GUIX_ENVIRONMENT'"))
       (profile ((@@ (ice-9 rdelim) read-line) port)))
  (add-to-load-path (string-append profile "/share/guile/site/3.0"))
  (set! %load-compiled-path
        (cons (string-append profile "/lib/guile/3.0/site-ccache")
              %load-compiled-path)))
--8<---------------cut here---------------end--------------->8---

I'm wondering if someone has a better solution to this?

-- 
Olivier Dion
oldiob.dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]