[Nix-dev] Override php xslSupport config option

Игорь Пашев pashev.igor at gmail.com
Tue Nov 1 22:52:06 CET 2016


Last time it didn't work for me :)

01 нояб. 2016 г. 22:56 пользователь "4levels" <4levels at gmail.com> написал:

> Hi all,
>
> seems like
>
>     nixpkgs.config.php.xsl = true;
>
> is all I needed to add to my NixOps deploy expression.. great!
> This triggered the download of the php sources (as well as libxslt) and
> PHP is being built with xsl support..
>
> I knew I was overlooking something obvious ;-)
>
> Kind regards,
>
> Erik
>
> On Tue, Nov 1, 2016 at 4:22 PM 4levels <4levels at gmail.com> wrote:
>
>> Hi all,
>>
>> I tried the other way as mentioned in the Wiki as follows:
>>
>>     nixpkgs.config.packageOverrides = pkgs: rec {
>>       php56 = pkgs.stdenv.lib.overrideDerivation pkgs.php56 (oldAttrs: {
>>         cfg.xslSupport = true;
>>       });
>>     };
>>
>> But this results in *error: cannot coerce a set to a string* in the php
>> default.nix file on line 18, which is the line where the version is
>> specified.  I'm clearly missing something obvious here (again) so still no
>> luck.
>>
>> Thanks for your support!
>>
>> Erik
>>
>> On Tue, Nov 1, 2016 at 2:35 PM 4levels <4levels at gmail.com> wrote:
>>
>> Hi all,
>>
>> I've managed to at least fix the build errors by adding the following
>> (after reading the Wiki on package overrides here https://nixos.org/wiki/
>> Nix_Modifying_Packages#Overriding_Existing_Packages
>>
>> So the nixops deploy command succeeds, but unfortunately still no xsl
>> support in PHP
>>
>> I currently have the following:
>>
>>     nixpkgs.config.packageOverrides = pkgs: rec {
>>       php56 = pkgs.php56.override {
>>         config = {
>>           xslSupport = true;
>>         };
>>       };
>>     };
>>
>>
>>
>> On Tue, Nov 1, 2016 at 2:21 PM 4levels <4levels at gmail.com> wrote:
>>
>> Hi Devs,
>>
>> thanks for the info!
>> However I'm struggling to get this in my NixOps config, my expression
>> keeps failing as I'm probably doing it all wrong since I have no experience
>> with packageOverrides.
>>
>> Can you provide an example (or link to one) where I can see this
>> mechanism work?
>>
>> This is what I currently have (excerpt):
>>
>>     environment.systemPackages = with pkgs; [
>>       wget
>>       unzip
>>       gitMinimal
>>       tmux
>>       mariadb
>>       php56
>>       duplicity
>>       nodejs
>>       redis
>>       php56Packages.apcu
>>       php56Packages.composer
>>       php56Packages.redis
>>       certbot
>>       sysstat
>>       iotop
>>     ];
>>
>>     nixpkgs.config.packageOverrides = php56:
>>       php56.merge {
>>         cfg = {
>>           xslSupport = true;
>>         };
>>       };
>>     }
>>
>>
>> On Sun, Oct 30, 2016 at 8:06 PM Jookia <166291 at gmail.com> wrote:
>>
>> On Sun, Oct 30, 2016 at 09:59:20PM +0300, Игорь Пашев wrote:
>> > Something like this:
>> >
>> > { php70 }: php70.merge {
>> >   cfg = {
>> >     apxs2Support = false;
>> >     ldapSupport = false;
>> >     mssqlSupport = false;
>> >     pdo_pgsqlSupport = false;
>> >     postgresqlSupport = false;
>> >     sqliteSupport = false;
>> >     xslSupport = false;
>> >   };
>> > }
>> >
>> > Use this with nixpkgs.config.packageOverrides
>>
>> It's really obscure how to use these old-timey .merge{} operations. Maybe
>> it
>> should be documented somewhere or finally replaced with proper overrides?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20161102/2209286f/attachment-0001.html>


More information about the nix-dev mailing list