[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use GUIX installed packages / libraries in Guile
From: |
Zelphir Kaltstahl |
Subject: |
Re: Use GUIX installed packages / libraries in Guile |
Date: |
Sat, 12 Jan 2019 17:19:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 1/12/19 1:49 PM, swedebugia wrote:
> Zelphir Kaltstahl <address@hidden> skrev: (12 januari 2019
> 13:18:49 CET)
>
> Hi,
>
> A while ago I installed Guix, initially only to be able to install
> GNUTLS, to be able to make HTTPS requests with the standard library's
> web client procedures http-get and similar.
>
> Now I have Guix and I installed GNUTLS, but Guile does not know where it
> is to find GNUTLS. For example the following code will tell me that
> GNUTLS is required:
>
> ~~~
> (use-modules (web client)
> #;(ice-9 receive))
>
> (call-with-values
> (lambda ()
> (http-get "https://duckduckgo.com"
> #:port (open-socket-for-uri "https://duckduckgo.com")
> #:version '(1 . 1)
> #:keep-alive? #f
> #:headers '()
> #:decode-body? #t
> #:streaming? #f))
> (lambda (response response-text)
> (display response)
> (display response-text)))
> ~~~
>
> Output:
>
> ~~~
> (… some backtrace here …)
>
> web/client.scm:105:2: In procedure tls-wrap:
> Throw to key `gnutls-not-available' with args `("(gnutls) module not
> available")'.
> ~~~
>
> I located something at:
>
>
> /gnu/store/z0g1wsiw2n5d1hspbj7xkhj6vnc2qlvp-gnutls-3.5.18/share/guile/site/2.2/gnutls.scm
>
> Also I found:
>
> ~~~
> ll /gnu/store/ | grep gnutls
> -r--r--r-- 2 root root 735 Jan 1 1970
> 259dacgq58awd2l8zq7i2p16l7j6a283-gnutls-3.5.18.tar.xz.drv
> -r--r--r-- 2 root root 2834 Jan 1 1970
> 7iajc4kiddris32jdkfn28gykvs25g1w-gnutls-3.5.18.tar.xz-builder
> -r--r--r-- 2 root root 3656 Jan 1 1970
> csji08kzw1rswy13jm7xk7f0rp130d55-gnutls-3.5.18.drv
> -r--r--r-- 2 root root 1315 Jan 1 1970
> ivyr33ppfcwkdmkyhk1p6ky7mijanhjj-gnutls-3.5.18.tar.xz.drv
> -r--r--r-- 2 root root 4414 Jan 1 1970
> kd0x57fwwvqqx8jircvs4bcawxskqzmh-gnutls-3.5.18-guile-builder
> -r--r--r-- 4 root root 579 Jan 1 1970
> l8ap56kw9nan13lkgrg8v8ayzfrn2gc5-gnutls-skip-trust-store-test.patch
> -r--r--r-- 4 root root 1008 Jan 1 1970
> sfg2p3l0363yk3s7hrzs1032fl0dga64-gnutls-skip-pkgconfig-test.patch
> ~~~
>
> For this and other libraries: How do I make Guile automatically use
> libraries installed through Guix?
>
>
> Here is some more technical detail:
>
> - I am using a Xubuntu 18.04 (lsb_release -d: Description: Ubuntu
> 18.04.1 LTS)
> - Guile version: 2.2.4
> - Guix version: 0.16.0 (installed binary distribution using the install
> script from the website)
> - I have the following in my ~/.bashrc related to Guile and Guix:
>
> ~~~
> # Guile Scheme Load Path
> export GUILE_LOAD_PATH=/home/xiaolong/development/Guile/libs # (this is
> where I put manually built and installed libraries)
> # GNU GUIX locales
> export GUIX_LOCPATH="${HOME}/.guix-profile/lib/locale"
> export PATH="${HOME}/.guix-profile/bin${PATH:+:}$PATH"
> ~~~
>
> - I have the following in my ~/.profile relating to Guile / Guix:
>
> ~~~
> # changes for GNU GUIX
> export GUIX_PROFILE="$HOME/.guix-profile"
> source "$GUIX_PROFILE/etc/profile"
> export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
> export LC_ALL="en_US.UTF-8"
> ~~~
>
> Regards,
>
> Zelphir
>
>
> Your path is probably wrong.
> Try installing guile in your profile and guix will tell you which path
> to set.
> --
> Sent from my p≡p for Android.
Hey,
Thanks for your quick response. I have a few questions:
* What do you mean by "install it in your profile"? Do you mean I should
add the lines for Guile in my ~/.profile?
* How or where does Guix tell me which path I have to set? I moved the
Guile stuff to my ~/.profile and ran a few Guix commands (install a
package, upgrade packages, pull), but it did not mention anything about
my path.
Thanks for you help,
Zelphir