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

Nick Sabalausky bus_nixos_list at semitwist.com
Fri Aug 12 22:06:35 CEST 2016


On 08/12/2016 02:58 AM, Roger Qiu wrote:
> 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!
>[...]
> 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.
>

Can you point me to documentation for that? I only know of installing 
via "environment.systemPackages", enabling a service, or "nix-env -i ...".

I did just now try following this:

https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides

And created a ~/.nixpkgs/config.nix containing (just to try things out) 
this:

{
     packageOverrides = pkgs: rec {
         firefox = pkgs.firefox.override {
             common.version = "33.0";
         };
     };
}

But then I just get:

$ nix-env -i firefox
error: attribute ‘override’ missing, at /home/nick/.nixpkgs/config.nix:3:13



More information about the nix-dev mailing list