[Nix-dev] How to install specific version of a package?

Roger Qiu roger.qiu at matrix.ai
Fri Aug 12 08:58:43 CEST 2016


Nix is based on content addressing. To install a specific version of a
package, just pick a version, fix the content address, and install it!

However nixpkgs is a community effort in creating a standard default
package set. This means the community decides to write nix expressions for
the versions the community wants, and also prunes old versions because the
community doesn't want to manage them, or have them take up space in the
hydra CI system.

However you can always write your own nix expression to install whatever
version you want, or if a previous (or newer) revision of nixpkgs had the
package, then you load that package set and point to a package there to
install it. (You can have multiple nixpkgs revisions operating at the same
time within the same configuration.nix)

Thanks,
Roger
On 12/08/2016 5:12 AM, "Nick Sabalausky" <bus_nixos_list at semitwist.com>
wrote:

> In general, how do you install a specific version of a package? It seems
> that by default it will install the latest available version like other
> distros, but for the most part installing "packagename-1.2.3"/etc doesn't
> appear to work.
>
> One of the biggest killer features of NixOS for me is the ability to
> sanely handle and manage different versions of the same package in
> different environments. But that ability seems severely crippled if I can't
> actually *install* any versions other than "latest" and "already previously
> installed on this machine while it *was* the latest, and hasn't yet been
> garbage collected".
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160812/c7803d6f/attachment-0001.html>


More information about the nix-dev mailing list