Hi Guixers,

I want to create a service that listens on an MQTT topic for messages (i.e. "pull docker") and runs corresponding commands on the local machine. For that to work I need guile-mqtt but I do to not understand how module visibility works in Guix. Coming from other languages I would assume that imports would check files next to the starting point and then bubble up a predefined PATH until it finds some module or fails. However that is not what I am seeing or at least the shell command is not working the way I am expecting to.
What am I missing?


guix shell guile-mqtt -- guile -c "(use-modules (mosquitto client)) (display \"Module loaded successfully\n\")"

Backtrace:
In ice-9/boot-9.scm:
  1752:10 13 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          12 (apply-smob/0 #<thunk 7f7ab0123300>)
In ice-9/boot-9.scm:
    724:2 11 (call-with-prompt ("prompt") #<procedure 7f7ab0130320 …> …)
In ice-9/eval.scm:
    619:8 10 (_ #(#(#<directory (guile-user) 7f7ab0126c80>)))
In ice-9/command-line.scm:
   185:19  9 (_ #<input: string 7f7ab0120850>)
In unknown file:
           8 (eval (use-modules (mosquitto client)) #<directory (gui…>)
In ice-9/eval.scm:
   721:20  7 (primitive-eval (use-modules (mosquitto client)))
In ice-9/psyntax.scm:
  1229:36  6 (expand-top-sequence (#<syntax:unknown file:1:0 (use-…>) …)
  1221:19  5 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   259:10  4 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/boot-9.scm:
  3935:20  3 (process-use-modules _)
   222:17  2 (map1 (((mosquitto client))))
  3936:31  1 (_ ((mosquitto client)))
   3330:6  0 (resolve-interface (mosquitto client) #:select _ #:hide …)

ice-9/boot-9.scm:3330:6: In procedure resolve-interface:
no code for module (mosquitto client)



Reply via email to