From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: How to "tell" a package so extent an environment variable? Date: Sun, 11 Dec 2016 18:41:50 +0100 Message-ID: <87d1gymkgx.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <584D5B85.20806@crazy-compilers.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG88K-0005Qj-Nr for guix-devel@gnu.org; Sun, 11 Dec 2016 12:41:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cG88H-00066L-Kn for guix-devel@gnu.org; Sun, 11 Dec 2016 12:41:56 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37392) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cG88H-000665-Dt for guix-devel@gnu.org; Sun, 11 Dec 2016 12:41:53 -0500 In-Reply-To: <584D5B85.20806@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel , guix-devel --=-=-= Content-Type: text/plain 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? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhNj94ACgkQoqBt8qM6 VPrB6gf9ETzC6cdIHjJ6GJvQH9oHjnbyP0kz4v1R86BWEu7FaCZeL75oh6DuZS8F 6TmsgWwACrewhMZapor/zlR019Ir+EGeIyzLoupcVfiwPlgF7K+3g+tk1ojs4OHU lC9JisErp+cangG/neYddd5OTf8r6cJGRHV011oN+hKsXAraq7FqoHn9pllDO8KZ k1IEe2CTTimzkzAcPZTWTdyin1GSBSHeRBx6i5VlPtDQI/MNAnqhsm6kgPOlAfLU Ij3nFkwuKJ/LKnJ/j53ZZ2+JFXuBOVGlpfwpV1B87WJvMxfix5LY17uxhrv6RB27 wGYaRvwaae8ANA3HR/Hw/sZFPscj0g== =QjvR -----END PGP SIGNATURE----- --=-=-=--