Nix vs. Linux Standard Base: Difference between revisions
→Modifying a Package: Copy edit and shorten |
Partial copy edit |
||
Line 1: | Line 1: | ||
This article is a comparison between the | This article is a comparison between the [[Nix package manager]] and the [https://en.wikipedia.org/wiki/Linux_Standard_Base Linux Standard Base] (LSB) standard that the package managers of most conventional Linux distributions follow. | ||
== Package Installation == | == Package Installation == | ||
In most distributions, | In most distributions, files of an installed package are stored under <code>/{,usr}/{bin,etc,lib,...}</code>. | ||
With Nix, the | With Nix, the files of a package go into a ''profile'' (as if it was a rootfs), and users can have as many profiles as they want. | ||
By default, the only part of the system made aware of the contents of the user profile is the PATH. The user PATH is set through bashrc to include `~/.nix-profile/bin`. So, by default, installing a Nix package means "having it in the PATH". A simple operation like <code>nix-env -i firefox</code> is meant to update the nix store, then generate a new profile in the store having all the programs ''installed'' plus the new one, and updating the symlink `~/.nix-profile`, so `~/.nix-profile/bin` will contain a symlink to the executable of firefox. Then a user can type <code>firefox</code> and have it running. | By default, the only part of the system made aware of the contents of the user profile is the PATH. The user PATH is set through bashrc to include `~/.nix-profile/bin`. So, by default, installing a Nix package means "having it in the PATH". A simple operation like <code>nix-env -i firefox</code> is meant to update the nix store, then generate a new profile in the store having all the programs ''installed'' plus the new one, and updating the symlink `~/.nix-profile`, so `~/.nix-profile/bin` will contain a symlink to the executable of firefox. Then a user can type <code>firefox</code> and have it running. |