IRC channel logs


back to list of logs

<rekado>upgraded Guix and now my system container script no longer boots.
<rekado>it’s strange. Only the shepherd root service appears.
<rekado>not even /var/log/messages exists in the container.
<rekado>no idea what’s happening. Maybe a problem with shepherd?
<rekado>perhaps it’s a problem with my rstudio shepherd service (in guix-science).
<rekado>it *is* a problem with the rstudio shepherd service, but the failure mode is so hostile that I can’t debug this easily.
<rekado>I’m guessing that it’s some sort of syntax error so shepherd fails to load it and then just gives up on booting the rest of the system
<civodul>i'm the person for ugly shepherd errors, tell me everything
<civodul>(with a specialization in incomprehensible run-time behavior)
<zimoun>rekado, civodul: I was giving a look at GUIX_EXTENSIONS_PATH. GWL does a “complicated” thing for loading modules (gwl main) and co. guix-modules has only one file. :-)
<zimoun>the question is: how to configure the extensions to have guix/extensions/foobar.scm and foobar/baz.scm ?
<rekado>civodul: this is the commit that broke everything:
<rekado>no matter whether I use the extra-options in my system declaration or not: shepherd seems to just stop.
<civodul>at first sight it shouldn't make any difference: you're splicing an empty list
<civodul>could you check the generated /gnu/store/*-shepherd-service.scm file?
<civodul>actually it's more like shepherd-rstudio-server.scm
<rekado>will do
<efraim>Even if the list is empty should you still start the command with apply?
<rekado>giggles are to be had here:
<rekado>all the complicated Docker instructions to process the texi file crack me up
<rekado>efraim: we use ,@ so the contents of the list are spilled right there
<rekado>efraim: the resulting expression is simply unchanged when the list is empty
<rekado>civodul: I was just preparing the shepherd-rstudio-server.scm file for you when I noticed that it references extra-options, which is nowhere defined in that same file.
<rekado>so I guess I’ve quoted a little too hard
<rekado>ah, it’s obvious now
<rekado>this is a g-expression
<rekado>I should have used the equivalent gexp unsplice thing
<rekado>thanks for making me think through it
<rekado>zimoun: GWL uses the extension merely as an entry point to load (gwl main). It doesn’t load anything else there, because that could complicate things.
<rekado>all further work happens in (gwl main).
<rekado>I don’t think the GWL is a good example to follow for all extensions, because it has really odd requirements that probably don’t matter for most extensions.
<civodul>rekado: great that you found out!
*civodul -> rubber-duck-as-a-service
<rekado>thumbsup emoji, duck emoji!
<zimoun>rekado: thanks. But since the entry point for an extension is guix/extensions/foobar.scm, how can I have in this guix/extensions/foobar.scm file something like #:use-module (my module baz) defined elsewhere in the same project (Git repo for being packaged)?
<rekado>zimoun: you can do that *after* extending the load path
<zimoun>rekado: I miss what you mean. Say I run ’GUIX_EXTENSIONS_PATH=path/to/profile/guix/extensions guix foobar’, does the *after* mean that guix/extensions/foobar.scm contains this load path extension to (my module baz)? Where the tree of the “project” contains the folder guix/extensions and my/module.
<rekado>guix/extensions/foobar.scm may provide the foobar command on its own, but if it wants to access other modules that are not on the load path then it needs to extend the load path before using them.
<zimoun>ok, but what happens for the declaration ’#:use-module (my module baz)’?
<zimoun>IIUC, they are not required, right?
<rekado>I don’t understand
<rekado>not required for what?
<rekado>if your module contains that use-modules clause before the directory containing the module was added to the load path then it will result in an error.
<zimoun>the folder structure of an extension is fixed. It must contain guix/extensions/foobar.scm with a define-command. It is the entry point. Then, you can have other procedure defined elsewhere. For instance, gwl/main.scm (what I named before (my module baz)).
<zimoun>The question is how to write an extension where the files live under foobar/ (as in gwl/). I mean how to declare the load path.
<zimoun>Other said, I understand how to do it with only one file for the extension (as it is done by the ’guix-modules’ extension).
<zimoun>I have a vague understanding about the GWL way.
<zimoun>I am asking what is the simplest way because I find the GWL way “complicated” (modulo the odd requirements)
<rekado>your extension at guix/extensions/foobar.scm may only use Guile modules provided by Guix or the Guile defaults in the define-module header.
<rekado>if you want to use anything else you need to first set the load path
<rekado>you can do that with add-to-load-path
<rekado>for this to work foobar.scm must have been given the directory containing (my module baz)
<rekado>in the GWL we do that at build time ( –> .scm)
<rekado>after setting the load path you can add (use-modules …) clauses that refer to modules outside of Guix or Guile.