[Nix-dev] Selecting a version of postgresql

Arie Middelkoop amiddelk at gmail.com
Fri Feb 3 10:03:28 CET 2012


> I poked around a little and discovered that there are three postgresql's
> in pkgs/top-level/all-packages.nix, and the "plain" postgresql is
> pointing to the oldest one. So I edited all-packages.nix to point to the
> newest one:
>
> ...
>    postgresql = postgresql90;
>
>    postgresql83 = callPackage ../servers/sql/postgresql/8.3.x.nix { };
>
>    postgresql84 = callPackage ../servers/sql/postgresql/8.4.x.nix { };
>
>    postgresql90 = callPackage ../servers/sql/postgresql/9.0.x.nix { };
> ...

Although not an answer to your problem, I just want to say that it is 
not needed to change all-packages.nix to choose a different version.
Instead, you can accomplish this via the attribute 
nixpkgs.config.packageOverrides by putting lines similar to below in 
your configuration.nix:

> nixpkgs.config = {
>     packageOverrides = orig: {
>       postgresql = pkgs.postgresql90;
>     };
>   };

Arie


More information about the nix-dev mailing list