alezost / guix.el

Emacs interface for GNU Guix package manager
https://emacs-guix.gitlab.io/website/
GNU General Public License v3.0
139 stars 16 forks source link

Error when running in a foreign distro #49

Open nanounanue opened 2 years ago

nanounanue commented 2 years ago

Hi, I am running Guix in two laptops, one is a full GuixOS and in the second one guix runs in a foreign distro (pop os!).

I don't have any problem running emacs-guix in the GuixOS laptop, but I am getting the following error in the foreign distro:

Debugger entered--Lisp error: (error "Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:\nUnbound variable: package/output-sexps\n\nEntering a new prompt.  Type `,bt' for a backtrace or `,q' to cont...")
  signal(error ("Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:\nUnbound variable: package/output-sexps\n\nEntering a new prompt.  Type `,bt' for a backtrace or `,q' to cont..."))
  error("Error in evaluating guile expression: %s" "ice-9/boot-9.scm:1685:16: In procedure raise-exception:\nUnbound variable: package/output-sexps\n\nEntering a new prompt.  Type `,bt' for a backtrace or ...")
  guix-geiser-eval("(package/output-sexps \"/var/guix/profiles/per-user..." #<buffer *Guix Internal REPL*>)
  guix-geiser-eval-read("(package/output-sexps \"/var/guix/profiles/per-user..." #<buffer *Guix Internal REPL*>)
  guix-eval-read("(package/output-sexps \"/var/guix/profiles/per-user...")
  guix-output-list-get-entries("/var/guix/profiles/per-user/nanounanue/guix-profil..." all)
  apply(guix-output-list-get-entries ("/var/guix/profiles/per-user/nanounanue/guix-profil..." all))
  bui-get-entries(guix-output list ("/var/guix/profiles/per-user/nanounanue/guix-profil..." all))
  guix-package-get-display("/var/guix/profiles/per-user/nanounanue/guix-profil..." all)
  guix-all-packages("/var/guix/profiles/per-user/nanounanue/guix-profil...")
  funcall-interactively(guix-all-packages "/var/guix/profiles/per-user/nanounanue/guix-profil...")
  call-interactively(guix-all-packages)
  magit-invoke-popup-action(97)
  funcall-interactively(magit-invoke-popup-action 97)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)

This error happened when trying to list the packages.

Two buffers are opened, besides de *Backtrace*: *Guix REPL* y *Guix Internal REPL*.

The first one shows the following:


Enter `,help' for help.
scheme@(guile-user)> ,m (emacs-guix)
While executing meta-command:
no code for module (gcrypt hash)
scheme@(guile-user)> 

The second one just this:


Enter `,help' for help.
scheme@(guile-user)> ,m (emacs-guix)
scheme@(emacs-guix)> 

NOTE: In the GUIX reddit someone post a similar problem: https://www.reddit.com/r/GUIX/comments/ouv0p5/problem_with_emacsguix_on_foreign_distro/?utm_source=share&utm_medium=web2x&context=3

nanounanue commented 2 years ago

Following the reddit post I added the following to my .profile:

nanounanue@sedol-kasparov:~$ env | grep GUILE
GUILE_LOAD_PATH=/home/nanounanue/.guix-profile/share/guile/site/3.0
GUILE_LOAD_COMPILED_PATH=/home/nanounanue/.guix-extra-profiles/emacs/emacs/lib/guile/3.0/site-ccache:/home/nanounanue/.guix-extra-profiles/emacs/emacs/share/guile/site/3.0
GUILE_COMPILED_LOAD_PATH=/home/nanounanue/.guix-profile/lib/guile/3.0/site-ccache:/home/nanounanue/.guix-profile/share/guile/site/3.0
nanounanue@sedol-kasparov:~$ guix search netlogo

Now, guix list all packages (using the transient interface) works, but searching for packages gives the following error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("@" nil 0)
  split-string(nil "@")
  byte-code("\300 \301\302\303\304\"\305\"@\306\307\2\4\235\205\23\0\2\"\310 D\207" [guix-package-names split-string thing-at-point symbol t "@" guix-read-package-name "Package: " guix-ui-read-package-profile] 6)
  call-interactively(guix-packages-by-name)
  magit-invoke-popup-action(110)
  funcall-interactively(magit-invoke-popup-action 110)
  call-interactively(magit-invoke-popup-action nil nil)
  command-execute(magit-invoke-popup-action)