Re: Appropriate way to use Guix API from a Guile program
On Wed, May 20, 2020 at 04:38:02PM -0500, sirgazil wrote: > Hi, > > I use Guix's GNU system. > > I had written a Guile script that called Guix procedures to manipulate > profiles. I put it in a Guix package in a custom channel and installed it. It > used to work, but now it fails with an error I can also reproduce when trying > to do something similar from a Guile REPL. For instance: > > > $ mkdir profile-x > $ guile > GNU Guile 3.0.2 > [...] > scheme@(guile-user)> (use-modules (guix scripts package)) > scheme@(guile-user)> (guix-package "-m" "manifest.scm" "-p" > "profile-x/profile-x") > error: glibc-bootstrap-system-2.2.5.patch: patch not found > > > This error is familiar. I got it in a slightly different context before when > running the guix command directly from a terminal > (https://lists.gnu.org/archive/html/help-guix/2020-05/msg00045.html). > > In the context of Guile scripting, how do I know which Guix is being > imported? > > Also, I didn't include guix as an input in the Guix package of the script > (though it worked). Thinking that it could make a difference, I tried adding > guix as an input, pulled the new package definition, upgraded the package, > ran the script, but got the same error. if you have a local checkout of Guix then I'd suggest using './pre-inst-env guile'. There's something about the core-updates merge that caused some problems. -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted signature.asc Description: PGP signature
Re: Appropriate way to use Guix API from a Guile program
sirgazil writes: > Hi, > > I use Guix's GNU system. > > I had written a Guile script that called Guix procedures to manipulate > profiles. I put it in a Guix package in a custom channel and installed it. It > used to work, but now it fails with an error I can also reproduce when trying > to do something similar from a Guile REPL. For instance: > > > $ mkdir profile-x > $ guile > GNU Guile 3.0.2 > [...] > scheme@(guile-user)> (use-modules (guix scripts package)) > scheme@(guile-user)> (guix-package "-m" "manifest.scm" "-p" > "profile-x/profile-x") > error: glibc-bootstrap-system-2.2.5.patch: patch not found > There are a couple of things going on here. Calling the Guix APIs from Guile will use the 'system-installed' Guix, unless you have fiddled with GUILE_LOAD_PATH. You can use 'guix repl' to use the _current_ Guix instead (the one obtained with 'guix pull'), where this problem has been fixed. The system-installed Guix in turn fails because of a bug that was fixed in 179e6c524ae4957e6ace83f72a5651767f786ca4, and ultimately 977f478090fd96e73463efb67c56fb32f28828bd which updates the 'guix' package to include the fix. If you reconfigure on a recent Guix, the missing patch error should go away. Hope this helps! signature.asc Description: PGP signature
Re: Appropriate way to use Guix API from a Guile program
On Thu, 21 May 2020 07:44:58 -0500 Marius Bakke wrote > sirgazil writes: > > > Hi, > > > > I use Guix's GNU system. > > > > I had written a Guile script that called Guix procedures to manipulate > > profiles. I put it in a Guix package in a custom channel and installed it. > > It used to work, but now it fails with an error I can also reproduce when > > trying to do something similar from a Guile REPL. For instance: > > > > > > $ mkdir profile-x > > $ guile > > GNU Guile 3.0.2 > > [...] > > scheme@(guile-user)> (use-modules (guix scripts package)) > > scheme@(guile-user)> (guix-package "-m" "manifest.scm" "-p" > > "profile-x/profile-x") > > error: glibc-bootstrap-system-2.2.5.patch: patch not found > > > > There are a couple of things going on here. Calling the Guix APIs from > Guile will use the 'system-installed' Guix, unless you have fiddled with > GUILE_LOAD_PATH. Ok. I haven't touched GUILE_LOAD_PATH. > You can use 'guix repl' to use the _current_ Guix instead (the one > obtained with 'guix pull'), where this problem has been fixed. > > The system-installed Guix in turn fails because of a bug that was fixed > in 179e6c524ae4957e6ace83f72a5651767f786ca4, and ultimately > 977f478090fd96e73463efb67c56fb32f28828bd which updates the 'guix' > package to include the fix. If you reconfigure on a recent Guix, the > missing patch error should go away. Oh, ok. I'll reconfigure then. Thanks Marius and Efraim.
Re: Update Xonsh
Thanks Tobias, The only part that I would change is in the "inputs" to add python-prompt-toolkit since it will add more complete functionality when presenting predictions or suggestions something similar to what fish shell and zsh do. (inputs `(("python-ply" ,python-ply) ("python-prompt-toolkit@2.0.7" ,python-prompt-toolkit))) regards El miércoles 20 de mayo del 2020 a las 1517 horas, Tobias Geerinckx-Rice escribió: Edison, Edison Ibáñez 写道: Thanks for the help, I just saw that they updated xonsh to the latest version Hi, they here :-) I wrote a file to install the latest version of this package but I cannot set this version as my user's default shell. I do a quick mail search before updating most packages. It looks like yours arrived just too late. Feel free to compare my bump[0] against yours & let me know if there are any interesting differences between them! Kind regards, T G-R [0]: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=72faca2c50d1e8a1a39ee334a24333fe09352a6c
Re: Appropriate way to use Guix API from a Guile program
The error is gone after reconfiguring, but I still have a question about using Guix API from a Guile script. On Thu, 21 May 2020 07:44:58 -0500 Marius Bakke wrote > sirgazil writes: > > > Hi, > > > > I use Guix's GNU system. > > > > I had written a Guile script that called Guix procedures to manipulate > > profiles. I put it in a Guix package in a custom channel and installed it. > > It used to work, but now it fails with an error I can also reproduce when > > trying to do something similar from a Guile REPL. For instance: > > > > > > $ mkdir profile-x > > $ guile > > GNU Guile 3.0.2 > > [...] > > scheme@(guile-user)> (use-modules (guix scripts package)) > > scheme@(guile-user)> (guix-package "-m" "manifest.scm" "-p" > > "profile-x/profile-x") > > error: glibc-bootstrap-system-2.2.5.patch: patch not found > > > > There are a couple of things going on here. Calling the Guix APIs from > Guile will use the 'system-installed' Guix, unless you have fiddled with > GUILE_LOAD_PATH. Hmm, and is there any way for a Guile program installed as a Guix package to use the modules of the Guix obtained by the user with "guix pull" and also being able to take advantage of user-defined channels? Or is this just not possible at all? Because I just tried creating a profile using my script and a manifest that includes one package from a custom channel of mine, and, as expected, I get an error: error: guile-glab: unknown package error: failed to load 'requirements/guix.scm': gnu/packages.scm:523:4: In procedure specification->package+output: Throw to key `quit' with args `(1)'.
Re: Appropriate way to use Guix API from a Guile program
sirgazil writes: > Hmm, and is there any way for a Guile program installed as a Guix package to > use the modules of the Guix obtained by the user with "guix pull" and also > being able to take advantage of user-defined channels? Or is this just not > possible at all? You need to add $HOME/.config/guix/current/share/guile/site/3.0 on GUILE_LOAD_PATH to access channel code from Guile programs. signature.asc Description: PGP signature
Missing zlib and readline when using pyenv
Cheers, In my normal development flow I have projects that depend on different versions of python, for this I use pyenv which allows me to configure the version to be used per project, but when installing any version it gives me an error indicating that neither readline or zlib is found, however these two libraries are installed. How can I solve this problem or because the libraries installed at the time of python compilation cannot be detected. Thank you very much for the help. – Edison Ibáñez One Emacs to rule them all
Re: Appropriate way to use Guix API from a Guile program
On Thu, 21 May 2020 15:52:59 -0500 Marius Bakke wrote > sirgazil writes: > > > Hmm, and is there any way for a Guile program installed as a Guix package > > to use the modules of the Guix obtained by the user with "guix pull" and > > also being able to take advantage of user-defined channels? Or is this > > just not possible at all? > > You need to add $HOME/.config/guix/current/share/guile/site/3.0 on > GUILE_LOAD_PATH to access channel code from Guile programs. Thanks again, Marius.
Re: Appropriate way to use Guix API from a Guile program
Dear sirgazil, On Thu, 21 May 2020 at 22:53, Marius Bakke wrote: > sirgazil writes: > > Hmm, and is there any way for a Guile program installed as a Guix package > > to use the modules of the Guix obtained by the user with "guix pull" and > > also being able to take advantage of user-defined channels? Or is this just > > not possible at all? > > You need to add $HOME/.config/guix/current/share/guile/site/3.0 on > GUILE_LOAD_PATH to access channel code from Guile programs. If you feel in an experimental mood, you can try the Konrad's patch [1]. It sets up the PATH accordingly and hides all the internals. Well, "guix repl" launches a REPL with the current Guix modules available and the patch extends that to scripts: "guix repl foo.scm". Note that '--load-path' is supported so you can extend by your own modules too. Last, command-line arguments passed to the scripts are not supported (yet). Well, if it is a script without command-line argument, then "guix repl foo.scm" is the thing that you would want, I guess. If it is a script with command-line argument, then extend "GUILE_LOAD_PATH" by '~/.config/guix/current/share/guile/site/3.0' and run "guile foo.scm arg1 arg2" is the thing that you would want, I guess. Be careful to not mix the modules from the package named 'guix' -- modules installed with "guix install guix" -- and the modules of the current Guix -- modules under ~/.config/guix/current/share/guile/site/3.0. I did the mistake once. :-) [1] http://issues.guix.gnu.org/41253 Hope that helps, simon