-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
Installing packages from different sources results in huge downloads. I think it's not what most new users would anticipate, as it deviates from how other package managers deal with this. To make this worse, it's hard to avoid.
For example:
$ nix profile install github:nixos/nixpkgs/nixpkgs-unstable#cowsay
# A week later:
$ nix profile install github:nixos/nixpkgs/nixpkgs-unstable#vimNow 2 different versions of nixpkgs are pinned. This behavior has a number of downsides:
- It results in huge downloads (long waiting time)
- It results in huge disk space usage (until all packages are upgraded and store GCed)
- It behaves differently from most package managers, where the package manager is usually pinned to a single package set until you explicitly tell it to update the package set (
apt update,pacman -y, etc). - It can result in incompatibilities when plugin-like libraries (like in
lib/gtk-3.0,lib/qt4/plugins) are used across multiple packages from differently pinned nixpkgs. These libraries are linked against different versions of glibc, which can result in runtime problems. It's fine if the user explicitly wants to do this, but currently it's the default withnix profile.
There are some advantages to having a nixpkgs-pin per package, but currently it is the default and shouldn't be something new users need to be aware of.
- The advantages are that the packages in
nix profileare kept as-is, thus stable. - Upgrading individual packages is possible, usually without major problems.
smcgivern, andrewhamon and szlend