6 ms·
I know I'm a Nix elitist but I really don't understand why people don't just use Nix for all their package management.
by ar_lan 3y ago
I know I'm a Nix elitist but I really don't understand why people don't just use Nix for all their package management.
- lreeves 3y agoProbably the EVE Online-like learning curve.
- arp242 3y agoLast time I tried it I couldn't even get it to work. I think I may have hit a bug, but to be honest I'm not sure: I also could have done something wrong. This was at the "let's download the package repository to get started" step. So, meh...
- Kinrany 3y agoThe docs could be better, but it's as easy as: 1. Install Nix from https://nixos.org/download.html https://nixos.org/download.html 2. Find the package from https://search.nixos.org/packages https://search.nixos.org/packages 3. Start a shell with `nix-shell -p <name>`, have the package available in it
- tripdout 3y agoOr even better, install it using the installer from Determinate Systems.
- deadly_syn 3y agoIts not really an argument for the tool if the solition is download another tool to wrap it.
- vanchor3 3y agoI must have terrible luck. I try this and it tells me one of the dependencies is "marked as broken" (and forcing it to install anyway doesn't work) so I instead end up digging through GitHub trying to track down the cause.
- appplication 3y agoSimilar spirit to “why doesn’t everyone just use vim it’s so powerful”
- ar_lan 3y agoUnironically, yes. I guess this is why I'm an engineer, and not a PM.
- rkeene2 3y agoOr AppFS (which I wrote), which gives you all the same benefits of Nix but with less work, though currently has way less packages.
- ar_lan 3y agoI'll have to check it out!
- rkeene2 3y agoLet me know if you have any questions (email in profile) ! Also check out CERN VM-FS [0], which is a similar idea, but AppFS has a simpler protocol and the implementation supports writing (writes by a user go to their home directory, so each user can have a different view of the packages). [0] https://cernvm.cern.ch/fs/ https://cernvm.cern.ch/fs/
- dpc_01234 3y ago`nix run nixpkgs#pkgx -- ...` :D ?
- cedws 3y agoBecause I don't want to learn another complex DSL just to install some packages. Whether Nix is the promised land or not, Brew works just fine 99% of the time and I have stuff to do.
- andrei_says_ 3y agoMe, too, and also I already have a bunch of brew packages which I know are well maintained. So, switch to using both? Uninstall brew packages and install nix versions, verifying they are all maintained over there? Sorry, no.
- ar_lan 3y agoNix Darwin supports brew, so this isn't really a reasonable argument. > So, switch to using both? This is an option, yes. Plus, it has the added benefit of you not needing to manage `brew doctor`, `brew cleanup`, etc. yourself. So you're not stuck with weird packages you installed once, never needed again, and forgot to clean up. It's strange that people are so against declarative systems, or even file-based OS configuration. When I get my new Macbook I was up-and-running within a few minutes. I can't imagine maintaining a list of brews I need to re-install just to set up everything + my configs + everything else. Nix Darwin just made this so ridiculously easy. Plus I can share almost all of my configuration with my Linux setups so I have a near-consistent environment whether I'm on Mac or Linux. The overhead of remembering the names for Brew, Apt, Snap, or whatever package managers exist seems like a lot of overhead, and I just value declarative, reproducible systems. Managing my packages on the fly? Sorry, no.
- drbaba 3y ago> It's strange that people are so against declarative systems, or even file-based OS configuration. When I get my new Macbook I was up-and-running within a few minutes. I can't imagine maintaining a list of brews I need to re-install just to set up everything + my configs + everything else. I haven’t had time to try Nix yet, but HomeBrew does have a declarative-ish workflow that I’ve been using for years: Brew Bundle [1] lets you have a plaintext file listing all packages you want installed on your system. Add a line for stuff you want installed, delete a line for stuff you want removed, invoke it the right way and it will install/remove packages until your system matches the list. The initial list can be generated by “brew bundle dump” or something like that. For configuration, I find that a normal dotfile repo cloned into my ~/.config (with a script that maintains symlinks to config files in e.g. ~/Library) works well enough for my use. [1]: https://github.com/Homebrew/homebrew-bundle https://github.com/Homebrew/homebrew-bundle
- paddim8 3y agoBevause nix is complex. I don't want a complex system, I want a simple system.
- ar_lan 3y agoNix is complex (I suppose), but I would argue once you've gotten past the learning curve, it's much simpler to orchestrate with. Determinate systems are far simpler to manage/debug.
- rtpg 3y agoThere's been some discussion around this, where tools like Nix and Bazel do a bunch of work figuring out how to get various packages working in their ecosystem, but often fail to actually get that work upstreamed in a reasonable way. For example, if you have a JS project with a package.json, Nix offers node2nix as a way to transform that package.json into Nix-like expressions. But in an alternate universe npm and lockfiles would "work" well enough to where we wouldn't need to rely on nix for package pinning. There's all this work put into reproducibility that thinks that the answers are around adding wrappers around the existing tooling. It's good as a last resort, but if those efforts were going more into each language's ecosystem may we would end up in a scenario where each packaging tool didn't have to come up with its own magic way of doing things. Nix and Bazel are complex because they try to hard to work well despite the tooling, rather than getting tooling to a place where all these layers of hacks were not an issue. And so downstream of that, "simple" tools become too complex from all the incidental complexity introduced by this way of doing things.
- eptcyka 3y agoInstead of relying on npm and maven and other language specific tooling, maybe we could rely on Nix to do the package management instead? NPM, Cargo, maven, whatever Python people think is good this Thursday, Go's reluctant dependency manager are all solving the same problems. And every single one of them could do a better job.
- rtpg 3y agoMost language package managers have some notion of dependency resolution, since various deps declare bounds for their dependencies instead of pinned versions (since otherwise frameworks would be impossible to upgrade). Nix the language doesn't have such a thing (would be a bit of a category error), and nixpkgs the ecosystem is so far away from that kind of thing... Language ecosystems around sharing source code cannot exist as they do today if every dependency pinned its dependencies to specific versions. Source distribution like that has different requirements than binaries.
- 3y ago