[Nix-dev] [nix language] strings that have paths/derivations embedded
Mathijs Kwik
mathijs at bluescreen303.nl
Tue Oct 9 16:16:38 CEST 2012
On Tue, Oct 9, 2012 at 4:08 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> Hi,
>
> On 09/10/12 06:09, Mathijs Kwik wrote:
>
>> I'm trying to escape a string using lib.escape.
>> My goals is to turn a string into a regex for grep that matches just
>> that string, so I need to escape regex special characters like . and
>> *.
>
> I just want to caution that doing this kind of string manipulation in the Nix
> language is likely to be very slow, so it's generally not a good idea! It's
> much better to do this in a builder.
I understand, but my usecase is quite small for now.
Just 1 or 2 lines from a crontab.
I will look into a builder too, for in case I start using this feature more.
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
More information about the nix-dev
mailing list