1. 20
  1. 5

    As someone who has tried to get Nix running on FreeBSD, the tragedy of it is that it’s a beautiful concept with an absolutely horrible implementation. I really wish FreeBSD would adopt it instead of building pkg. In a few years, pkg will be caught up to apt and I’ll be let down just as equally.

    1. 3

      There’s hnix, a community effort in re-implementing the Nix expression language in Haskell, currently in the works. While the focus has been on the expression language (and not the package manager) so far, it does look promising. There’s some more details on Haskell Cast’s Episode 13 with John Wiegley.

      As for user experience of the CLI tool, there’s the famous redesign issue, and the “new” nix command has been available on nixUnstable.

      1. 4

        There is also guix, which uses guile scheme for the pkg language.. Never used it though.

      2. 1

        Could you say more about what’s wrong with the implementation. They used it at a previous job. It was all set up by someone else though so I don’t know anything about the bits that are hard to get working.

        1. 3

          I’ve been using Nix for 2.5 years and here’s a couple of things that aren’t great:

          It binds directly to Curl to download things, it’s a bit annoying if you want to customise Curl stuff:


          There are special things inside of the evaluator to do things like “access to the references graph of their inputs”


          Then there’s a few things in Nixpkgs which aren’t great, e.g. a lot of packages don’t separate “host system” and “target system” making cross-compilation a bit of a pain.

          1. 2

            The implementation is a hot mess of C++ and Perl (although the Perl is either gone by now or on its way out). The C++ also contains some Linux-isms rather than pure POSIX, which seems odd to me since it’s not really doing anything Linux specific. The C++ is also not very well written, instead of using RAII it uses Boehm GC which is a huge hack.

            Nix is the outgrowth of an academic project so it’s academic code and it has continued to grow as such and people are doing their best with it. It’s just unfortunate that the implementation is such a mess. Maybe a Haskell implementation will take over that is a bit better (although Haskell has its own set of problems around bootstrapping that concern me).

            1. 1

              For what it is worth, I think the reason it uses Boehm GC is because it is a whole language, and this is possible:

              nix-repl> let a = {}; a.a = a; in a.a.a.a.a.a
              { a = { ... }; }

              I don’t think any standard library tooling will let this destruct. Am I out of touch on that?