[Nix-dev] how to go about refactoring nixos-container?

Rok Garbas rok at garbas.si
Thu Jul 21 16:06:04 CEST 2016


my suggestion would be to start completely new project outside
nixos/nixpkgs and then if/when working then we can open an discussion
to replace nixos-container in nixpkgs.

and about the language. does it really matter. if you can do it in c++
that is currently preferred language in nix, but if you go the way i
suggested above and create new command line tool then it all depends
on you and your preferences. my current language of choice for cli
stuff is rust, but everything you'll choose is fine as long as the
tools is working :)

here are some name suggestions for new tools:
 - nixos-container-ng
 - nixos-container2
 - nixos-container-improved
 - nixos-kontainer

:)



On Thu, Jul 21, 2016 at 3:33 PM, zimbatm <zimbatm at zimbatm.com> wrote:
> The main criteria for language selection in the nix tooling is platform
> availability and it's really hard to beat C++ and Perl on that. That being
> said for that specific project you might argue that "language of choice"
> only has to support platforms that also support containerisation. If we're
> relying on docker then "go" might be a good choice.
>
>
> On Wed, 20 Jul 2016, 21:22 Eric Merritt, <eric at merritt.tech> wrote:
>>
>> Maintainers,
>>
>> I have been spending a fair amount of time adding bits to
>> `nixos-container` and expect to be spending more time there as I have
>> started using it heavily for standing up and testing groups of systems. It's
>> been tempting to refactor the command. Before doing that I wanted to ask the
>> maintainers the path with the highest likelihood of being accepted, to avoid
>> waisting a lot of time on dead ends.
>>
>> 1) No refactor - Maintainers think its fine as is
>> 2) Refactor in Perl - Just cleanup the Perl, reducing globals and the like
>> 3) Rewrite in C++ - Questionable utility, but I really do hate Perl rather
>> a lot
>> 4) Rewrite in an approved functional language <X>
>>
>> I would strongly prefer #4 almost regardless of what that language is.
>> However, I am pretty confident that the only approved languages for core nix
>> stuff is C++ and Perl. That leaves 2 and 3. Probably the most sane is #2. I
>> would be more than willing to do #3. You would have to let me know which
>> versions of C++ are supported, hopefully its something like C++11 or C++14.
>>
>>
>>
>>
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
Rok Garbas
https://garbas.si


More information about the nix-dev mailing list