this post was submitted on 18 Feb 2024
127 points (93.8% liked)

Linux

48334 readers
873 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Distro agnostic packages like flatpaks and appimages have become extremely popular over the past few years, yet they seem to get a lot of dirt thrown on them because they are super bloated (since they bring all their dependencies with them).

NixPkgs are also distro agnostic, but they are about as light as regular system packages (.deb/.rpm/.PKG) all the while having an impressive 80 000 packages in their repos.

I don't get why more people aren't using them, sure they do need some tweaking but so do flatpaks, my main theory is that there are no graphical installer for them and the CLI installer is lacking (no progress bar, no ETA, strange syntax) I'm also scared that there is a downside to them I dont know about.

you are viewing a single comment's thread
view the rest of the comments
[–] toasteecup@lemmy.world 9 points 9 months ago (16 children)

You're not exactly comparing apples to apples here.

Flatpak and appimages tend to be used in any distro because they can just be downloaded in a one off manner and installed then you're running the application (for the most part). They offer a manager of sorts but you don't need it to use the packages.

For nixpkgs, whike I'm sure I can get a package from the sounds of the sizes the package covers only the application or the library, meaning I still need the dependencies.

So what exactly would make me the user trade my built in tools (apt/pacman/dnf) for nix? Keep in mind no matter how great you feel it is, you need to provide reasoning that motivates me to install and learn this new tool instead of the old ones I have.

[–] 2xsaiko@discuss.tchncs.de 7 points 9 months ago* (last edited 9 months ago) (13 children)

For nixpkgs, whike I’m sure I can get a package from the sounds of the sizes the package covers only the application or the library, meaning I still need the dependencies.

When you download/build a nix package, nix will absolutely also download all necessary dependencies.

So what exactly would make me the user trade my built in tools (apt/pacman/dnf) for nix?

Getting a shell with a specific package as a one off. Want ffmpeg? nix-shell -p ffmpeg opens a shell with ffmpeg in its path, and only that shell has it.

Along with that, that means users can install packages for themselves. Limited use for single-user systems, but nonetheless it's possible.

Per-project dependencies. Pretty much the same as above, but the dependencies are declared in a file which is part of the project. In many cases that same file can also be used as a nix package itself, like any other in nixpkgs. Very useful if you write software yourself. Here's an example.

Being a source-based package manager with a cache means that you get all the benefits of prebuilt packages but can easily patch or use other versions of a package, with no difference in use (other than that it will build it locally instead of downloading from the cache).

On a distro with a different main package manager I would probably mainly use it for per-project dependencies though.

[–] toasteecup@lemmy.world 2 points 9 months ago (7 children)

So it sounds like nixpkgs is more akin to virtualenvs in Python rather than a traditional package manager. Is that an accurate statement?

If so, I'd recommend that be your selling point because that's some powerful security.

[–] ParetoOptimalDev 6 points 9 months ago

Virtualenvs for everything that don't duplicate resources and are reproducible.

load more comments (6 replies)
load more comments (11 replies)
load more comments (13 replies)