[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Search paths in packages
From: |
Roel Janssen |
Subject: |
Re: Search paths in packages |
Date: |
Mon, 09 Oct 2017 22:57:28 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.1.1 |
Ludovic Courtès writes:
> Hi Roel,
>
> Roel Janssen <address@hidden> skribis:
>
>> I have a question about how search paths are handled in Guix.
>> So, I have a package that tries to set an environment variable:
>> DRMAA_LIBRARY_PATH.
>>
>> So, I tried:
>> (native-search-paths
>> (list (search-path-specification
>> (variable "DRMAA_LIBRARY_PATH")
>> (files '("lib/libdrmaa.so")))))
>
> If you want to match a regular file instead of a directory (the
> default), you must write:
>
> (search-path-specification
> (variable "DRMAA_LIBRARY_PATH")
> (files '("lib/libdrmaa.so"))
> (file-type 'regular))
>
> This will match all the lib/libdrmaa.so files found in the environment.
>
>> But after running:
>> $ guix environment --container --ad-hoc <the-package> bash coreutils
>>
>> ... the DRMAA_LIBRARY_PATH is not set.
>
> That’s because none of the packages listed after --ad-hoc contains a
> lib/libdrmaa.so file.
>
> You can do this experiment with GIT_SSL_CAINFO:
>
> --8<---------------cut here---------------start------------->8---
> $ guix environment -C --ad-hoc git coreutils -- env |grep GIT
> GIT_EXEC_PATH=/gnu/store/m5baadh2m4kgvzgxc5m3phw9f6pyhwnv-profile/libexec/git-core
> $ guix environment -C --ad-hoc git coreutils nss-certs -- env |grep GIT
> GIT_SSL_CAINFO=/gnu/store/x6f5ywznnjzwa81a3g7rcs5riippx2zh-profile/etc/ssl/certs/ca-certificates.crt
> GIT_EXEC_PATH=/gnu/store/x6f5ywznnjzwa81a3g7rcs5riippx2zh-profile/libexec/git-core
> --8<---------------cut here---------------end--------------->8---
>
> In the first run, there was no etc/ssl/ca-certificates.crt file, so
> GIT_SSL_CAINFO was undefined.
>
> HTH!
>
> Ludo’.
Thanks for explaining this! Now I've got it working as I intended it,
indeed.
Thanks!
Kind regards,
Roel Janssen