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’.