Hartmut Goebel writes: > Hi, > > I'm working on some PHP extension packages. > > In PHP extensions need to be enabled by listing in some .ini file and > php needs to be told which .ini files to read. The later can be done by > setting the environment variable PHP_INI_SCAN_DIR when running php (or > related). This is much like setting PYTHONPATH for python modules. > > So I need to "tell" the package so extent PHP_INI_SCAN_DIR when it gets > installed. > > How can this be done without creating a php-build-system? If PHP can read multiple INI files (which the variable name leads me to believe), you can add a 'native-search-path' to the PHP expression and have each extension register an INI file in this directory. For example: (define-public php [...] (native-search-paths (list (search-path-specification (variable "PHP_INI_SCAN_DIR") ;; This might not be the best place to add them. (files '("php/ini"))))) And then, for extensions, they should install an INI file that enables them to $out/php/ini. When users install PHP, PHP_INI_SCAN_DIR will be pointed towards the users' .guix-profile/php/ini directory. Would this approach work?