Hi everyone, zimoun <zimon.touto...@gmail.com> writes:
>> Thanks for the reminder that my "guix repl" patch needs more work - it >> should accept command line arguments for the script. Something like >> >> guix repl foo.scm –- [ARGS] >> >> should be easily doable, and fits in with existing conventions. > > It could be really cool! :-) Unfortunately, it doesn't look as straightforward as I thought. A standard Guile script retrieves command line arguments using (command-line). "guix repl" should ideally manipulate the return value of (command-line) to make things just work, but I haven't found a way to do this. The other solution is to define a command-line interface specifically for scripts run using "guix repl", which looks like a lot of effort for a less-than-optimal result. Alex Sassmannshausen <alex.sassmannshau...@gmail.com> writes: > I can't help but think that it would be really useful to have a way to > inject these load paths into the general user environment, in a way > similar to `guix package --search-paths', so that the currently pulled > guix can be just another guile library to be used on the system like > any other. I don't see any other way to do this than to shell out to "guix", parse the return value, and modify load-path. Certainly doable, but I am not sure it's worth the effort. The problem with Guix is that are so many of it. Most users have a single Guix version that they update using "guix pull", but others also use development branches compiled locally and invoked via the preᵢnstₑnv script. In the end it's the user who picks the right Guix for the job at the command line. Any Guile script referring to Guix should offer the same flexibility. sirgazil <sirga...@zoho.com> writes: > And if you wanted to run the script without typing "guix repl", what would be > the first line of the script. This? > > #!~/.config/guix/current/bin/guix repl > !# I'd go for > #!/bin/env guix repl > !# or something like that. I suspect it requires some more incantation magic to work. Cheers, Konrad