5 ms·
For installing a package, you have to specify the package repository. For uninstalling, you don't because you're operating against a separate repository contain
by soraminazuki 5y ago
For installing a package, you have to specify the package repository. For uninstalling, you don't because you're operating against a separate repository containing locally installed packages. This should be the same for the new CLI too.
Looking at the manual[1], instead of:
nix profile remove nixpkgs#ripgrep
You'd probably need to run:
nix profile remove packages.x86_64-linux.ripgrep
For searching packages,
nix search nixpkgs ripgrep
is faster than
nix-env -qaP ripgrep
But I find the online search UI[2] to be far more superior.
[1]: https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-profile-remove.html https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni...
[2]: https://search.nixos.org/packages https://search.nixos.org/packages
- brongondwana 5y agoThis sounds like an unpleasant UX. Am not compelled to try.
- soraminazuki 5y agoIf Nix was about replacing apt's CLI syntax, then sure. But its promises are more than that.
- brongondwana 5y agoIs there any data on how many people care about said promises as opposed to care about not having an actively hostile and prickly interface? Because I enjoyed tinkering with this kind of thing in my 20s, but in my 40s I just want something that I can use without having to memorize a ton of arcania, and that lets me solve my problem and get back to my actual goals. I never wake up saying "today I want to install a package on my computer and revel in my extreme knowledge of how my package manager works". I wake up with plans, and installing a package might be necessary to achieve them.
- soraminazuki 5y agoTo be clear, Nix's CLI syntax is what it is because of the following requirements: * Provide the ability to create a new package by extending an existing package definition programatically * Provide the ability to have multiple variations of similar packages To satisfy those requirements, you need a way to uniquely specify packages by its precise location of its definition. It does not interact well with apt's model of having a central package repository assign names for every known package. > "today I want to install a package on my computer and revel in my extreme knowledge of how my package manager works" Was this straw man mockery really necessary?`
- atoav 5y agoHow about just using the default source that users would like to use 90% of the time and then provide an option to override this default? Nix is a great system, which is why it would be a waste to not invest some thought in it's CLI ergonomics.
- soraminazuki 5y agoNix devs seem focused on improving the ergonomics of the new command line, but it’d probably take time to flesh out the details. In the meantime, I think specifying the package source is a reasonable tradeoff given the features it enables. I also suspect that keeping the package specification the same between installation and uninstallation time is harder than it might look, though. By its nature, Nix identifies packages by the contents of their definition. “nixpkgs#ripgrep” is merely a pointer to the current ripgrep package definition in the Nixpkgs repository. Therefore, “nixpkgs#ripgrep” will likely not point to the same package at the time of uninstallation.
- brongondwana 5y agoNot strictly necessary, but neither is the dismissal of serious usability issues as "well actually, it's this way because of reasons" which basically boil down to "not designed with the kind of use-cases in mind that many users here are saying cause them pain". The idea that you can't remove a package by the same name you added it by is just obnoxious. Sure there are reasons for it, but the reasons boil down to "screw you users" if you're just trying to use it. And a project which is actively hostile to usability feedback doesn't fill me with excitement to start depending on it. `nix install foobar`: There are N versions of foobar. Choose one of: * nix install foobar.gnu * nix install foobar.lfs * nix install foobar.experimental20220104 (pre-formatted for copy-paste) `nix remove foobar` You have two versions of foobar installed. Choose one of: * nix remove foobar.gnu * nix remove foobar.experimental20220104
- IshKebab 5y agoWhy can't it promise more than that without a terrible CLI? Seems like a poor excuse.
- rgoulter 5y agoI think it's good to consider ways in which Nix's UX could be improved. But I'd draw an analogy to vim or emacs. These have steep difficulty curves to them, but provide a power-user experience. Roughly, Nix is to apt-get what vim is to notepad. -- It'd be weird to try vim but live in insert mode the whole time. It's not a matter of "no-the-ux-doesn't-suck", but more "if you can get past the rough edges, the things which Nix allows are wonderful".
- unnah 5y agoSpeaking of vim vs emacs, how does the nix command line interface compare to GNU Guix?
- opan 5y agoGuix greatly simplifies things. Like others said for Nix, I really would recommend managing things declaratively in your system config and a manifest file, but the basic cli isn't bad. guix install ranger guix remove ranger guix pull guix upgrade guix search ranger These basics just work how you'd expect last I checked. There is some `guix shell` stuff as well, but I don't use it, so won't be able to say much about it.
- rekado 5y agoSee the refcard for an overview on the Guix CLI: https://guix.gnu.org/guix-refcard.pdf https://guix.gnu.org/guix-refcard.pdf
- soraminazuki 5y agoWhat is terrible about explicitly specifying the source of the package definition? Seems like a dramatic conclusion to make based on a minor detail of the command line syntax.
- deleted 5y ago[deleted]
- i_hate_pigeons 5y agoyou never use nix env really, agree if that's the only thing you are after then there is no point switching