* Search paths
@ 2013-03-30 22:09 Ludovic Courtès
2013-04-28 21:44 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2013-03-30 22:09 UTC (permalink / raw)
To: bug-guix
Hey, hey!
Commit a18eda2 in ‘core-updates’ adds the ‘native-search-paths’ field
for packages, and honor it. The next commit gives an example of how to
use it.
As discussed before, this mechanism allows the declaration of a
package’s search path environment variables. Examples follow.
GCC has this:
(native-search-paths
(list (search-path-specification
(variable "CPATH")
(directories '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
(directories '("lib" "lib64")))))
Guile 2.0 has this:
(native-search-paths
(list (search-path-specification
(variable "GUILE_LOAD_PATH")
(directories '("share/guile/site/2.0")))
(search-path-specification
(variable "GUILE_LOAD_COMPILED_PATH")
(directories '("share/guile/site/2.0")))))
Perl has this:
(native-search-paths (list (search-path-specification
(variable "PERL5LIB")
(directories '("lib/perl5/site_perl")))))
With those specifications, any package that has (say) Perl as an input
along with several Perl modules has PERL5LIB correctly set in its build
environment.
It’s extensible, so it’s much better than what we had before.
Please report any problems or kudos! :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Search paths
2013-03-30 22:09 Search paths Ludovic Courtès
@ 2013-04-28 21:44 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2013-04-28 21:44 UTC (permalink / raw)
To: bug-guix
ludo@gnu.org (Ludovic Courtès) skribis:
> Commit a18eda2 in ‘core-updates’ adds the ‘native-search-paths’ field
> for packages, and honor it. The next commit gives an example of how to
> use it.
With commit 5924080, ‘guix package --install’ reports environment
variables that needs to be defined, using information from
‘native-search-paths’.
For example, if you install GCC and a C library, it will tell you to set
CPATH=$HOME/.guix-profile/include and
LIBRARY_PATH=$HOME/.guix-profile/lib, unless the environment variables
are already defined appropriately.
Also, ‘guix package --search-paths’ lists environment variables that
need to be defined, regardless of their current value.
Hopefully that will help avoid common mistakes when using Guix.
Comments welcome!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-28 21:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-30 22:09 Search paths Ludovic Courtès
2013-04-28 21:44 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).