[Nix-dev] 3 thoughts

stewart mackenzie setori88 at gmail.com
Mon Mar 7 06:10:01 CET 2016


On Mon, Mar 7, 2016 at 1:00 PM, Anderson Torres
<torres.anderson.85 at gmail.com> wrote:
> 2016-03-07 1:21 GMT-03:00 stewart mackenzie <setori88 at gmail.com>:
>> It would be nice to have 3 things.
>>
>> 1) a more powerful substituteInPlace, ie a regexInPlace.
>
> I think we can just use a type of 'sed' in the text - it would be very
> powerful! But I don't know if it is viable. Also, because
> "substituteInPlace" is just a function script,

Yes I use sed a lot, to the point this concept should be a first class
citizen, ie regex in perl is a first class citizen.
But it goes further than just replacing using sed, one should be able
to capture strings and creating nix lists for further processing.

>> 2) "patchShebangs" for arbitrary strings in a file
>> 3) Have an nix API for automation. A program can drive Nix.
>
> Like Nixops or Monitor?

Ah, you have a good point, thanks! I saw no documentation on this API,
I'll study how nixops interfaces with nix.


More information about the nix-dev mailing list