News for hackers. Stuff that matters.
Re:My Experience with Nix on OS X by defiancedigital on Monday May 30, 2016 @04:07PM (#11802887)
Redesign of nix command line is a good thing. Nix should be more intuitive.

I totally agree that nix is the future of package management.

Re:My Experience with Nix on OS X by nextos on Monday May 30, 2016 @05:14PM (#11803239)
I found Guix ones more understandable.

Also Guix switch challenge is incredible from a security perspective: https://www.gnu.org/software/guix/manual/html_node/Invoking-...

Nix should take those things back. Overall, it's a great package manager.

Re:My Experience with Nix on OS X by nikolay on Monday May 30, 2016 @04:42PM (#11803061)
Many of the nix switches and commands are non-intuitive. I always have to check the man page, and I'm more often than not surprised by their choices!
Re:My Experience with Nix on OS X by mitchty on Monday May 30, 2016 @04:52PM (#11803123)
They're patterned after rpm generally.
Re:My Experience with Nix on OS X by nikolay on Monday May 30, 2016 @05:08PM (#11803199)
Which is a poor choice! Picking yum or apt as the model would have been a saner choice! I feel the same way dealing with Arch Linux - being different (read "weird") isn't always better!
Re:My Experience with Nix on OS X by hk__2 on Monday May 30, 2016 @05:18PM (#11803261)
> being different (read "weird") isn't always better!

To go further, being different is almost always a bad idea. People are used to how current stuff works; you need a really good reason not to provide the same interface.

Re:My Experience with Nix on OS X by mitchty on Tuesday May 31, 2016 @08:14AM (#11806071)
Sure but its not different/weird. I've used rpm for a long time, using nix was more, oh ok so rpm type flags no big deal.

It is weird mostly due to exposure to other tools. IIRC nix started out over 10 years ago, well before apt or yum became very widely used.

Re:My Experience with Nix on OS X by nikolay on Tuesday May 31, 2016 @07:02PM (#11810959)
RPM-based distros are not the most popular, though [0]!

[0]: http://distrowatch.com/

Re:My Experience with Nix on OS X by mitchty on Sunday June 05, 2016 @08:01PM (#11843818)
Sure, now, but was that the case 10 years ago? I'm not arguing its the best choice but more that you need to take into account the age of things. Being exposed to it just now doesn't mean it was created in that situation. I'd say 10 years ago rpm based distributions were the more dominant and emulating rpm was a fine choice.
Re:My Experience with Nix on OS X by paperpunk on Monday May 30, 2016 @04:48PM (#11803100)
What makes Nix the future of package management? I'm not familiar with it so I don't know!

I looked at the web-site and didn't find it clear what it does that Homebrew doesn't, other than being cross-platform (although I recently started using Linuxbrew which has made Homebrew cross-platform-ish for me).

Re:My Experience with Nix on OS X by sirn on Monday May 30, 2016 @06:22PM (#11803558)
The power of Nix start when you start building your own ~/.nixpkgs/default.nix (but you don't really need to if you don't want to):

    {
      packageOverrides = pkgs: with pkgs; rec {
        all = buildEnv {
          name = "all";
          paths = [
            vim
            fish
            gitAndTools.gitFull
          ];
        };
      };
    }
    
This is the Nix package collection. You can install this package with `nix-env -i all`. What does it do? Install vim, install fish, install git. Not much, and easily doable in Homebrew in much fewer keystrokes.

Now imagine you decided that you don't like vim and want to go with emacs. You change the paths to `paths = [ emacs fish gitAndTools.gitFull ]`. Run `nix-env -i all` again. What does it do now? It uninstall vim and install emacs.

Now that you decided you don't like emacs after all and want to go back to vim. You can just run `nix-env --rollback` and it will happily rollback the change it made to the filesystem made by latest nix-env call, as in, restoring vim at where you expect it to be.

This is the declarative nature of Nix. You declare the state you want the package to be (or the whole system, in case of NixOS) and Nix will figure out how to get to that state. default.nix can also do a lot more things, for example, adding custom packages, overriding versions, changing build flags and much more.

Let's say one day you need to clone the whole setup to other machine, you only need to copy this default.nix and run `nix-env -i all` on that machine and everything is reproduced in the way you expected. This default.nix can also be per-project, allowing collaborators to share the same packages (and custom packages).

Re:My Experience with Nix on OS X by bobbyi_settv on Tuesday May 31, 2016 @12:01AM (#11804470)
> It uninstall vim and install emacs.

If a package system is well designed, having the package for vim on my system shouldn't be doing any harm even if I'm not currently using it, so the system you are describing isn't really any better than just having a list of packages I want installed in a text file.

Re:My Experience with Nix on OS X by sirn on Tuesday May 31, 2016 @02:26AM (#11805000)
That is not the point I want to make. Having both Vim and Emacs doesn't really do any harm. You can even have multiple versions of Vim in the same machine, even with different and incompatible dependency version, and Nix will happily manage that. The point is that with Nix collection, it will try to build the system exactly as described without any kind of side effect.

Using Vim isn't the best example (why would someone want multiple Vim?) but the same apply to languages as well. For example if I want to use Python 3.2, but there are handful of utilities that require 3.3+. I can just install 3.2 to my profile and install those utilities with 3.5 without actually exposing 3.5 to my profile.

Re:My Experience with Nix on OS X by chaosfox on Monday May 30, 2016 @04:55PM (#11803137)
read this: https://nixos.org/nix/about.html

I don't know if it is "the future", but it has features that would be very welcome in other package managers.

Re:My Experience with Nix on OS X by renox on Tuesday May 31, 2016 @10:26AM (#11806682)
>I totally agree that nix is the future of package management.

Perhaps, if they clean it up significantly, I think that nix's principles are very sound, but the implementation isn't: it's fine when you are using it as a simple package manager but as soon as you want to do something a bit complex (say building gcc with a different kernel version) you're on your own:

1) half of the documentation makes reference to configuration files which aren't in my version of nix??

2) there is no real mail/news forum for support/help: no IRC isn't enough.

Re:My Experience with Nix on OS X by rokgarbas on Monday May 30, 2016 @05:16PM (#11803250)
a redesign of nix command line is on the way. so thins should get easier.
Re:My Experience with Nix on OS X by k__ on Tuesday May 31, 2016 @03:48AM (#11805284)
how long will this take?