On Sat, Jun 18, 2016 at 4:01 AM, Mick <michaelkintz...@gmail.com> wrote:
> On Thursday 16 Jun 2016 21:25:01 J. García wrote:
>
> How does Nix compare to flatpack, docker, snap, et al. from a gentoo
> perspective?
>

Nix is a similar sort of approach.  I don't think they run apps in
containers (though they probably could if they wanted to do the work
and a lot of bind mounting).  The reality is that they're a form of
bundling, but the bundled libs can be shared.  Basically everything is
linked to uniquely identified dependencies.  So, a package isn't just
linked to zlib, or even a particular version of zlib, but a particular
build of zlib.  However, 15 different packages could all depend on
that same build.  So, you potentially don't get the same kind of
memory duplication that you do with outright bundling.  However, if
you install a new version of zlib on your system, nothing will
actually use it, unless those packages are themselves updated.  So, in
that respect it is just like bundling.

Since the libraries you're running with on your box are exact copies
of the binaries the packager was using, you're going to get the same
experience the packager did when they were testing their package.  So,
that's the big upside.  There are no conflicts or collisions either,
since every package is installed in what amounts to a private
namespace.  You can have 14 different packaged builds of zlib-1.2.3 if
you want to, with different builds being used by different
applications.

This is just my understanding based on having looked into NixOS a bit
out of curiosity.  Somebody closer to the project should feel free to
correct any errors I made.  There are obviously pros and cons to this
approach.

-- 
Rich

Reply via email to