[Nix-dev] Selecting a version of postgresql

Bryce L Nordgren bnordgren at gmail.com
Fri Feb 3 01:44:00 CET 2012


Newbie question here: I noted that simply enabling services.postgresql in
the configuration.nix file installed version 8.3.4. My (possibly ignorant
and misguided) attempt to change which version was installed results in a
postgresql service which hangs on startup. Configuration.nix snippet:

  services.postgresql = {
    enable = true ;
    enableTCPIP = true ;
  } ;


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 { };
...

I did a nixos-rebuild boot, rebooted, and it hangs now. The wierd thing is
that the output does not suggest to me that it fetched or built a different
version of postgis:

building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/13f5v9w0qzj1d9f6pb5c9i7r2hqlpsay-upstart-postgresql.conf.drv
  /nix/store/7fafhnzq7ck1dp94c46v58kpmhvqiccr-options-db.xml.drv
  /nix/store/azzk0lj4qmqymri0my2asdks9h111im0-system-path.drv
  /nix/store/hh8n2fz2hz784ypjnd1kaaz8icaw8l65-dbus-conf.drv
  /nix/store/kql1yfndg83hbpx0hw04fjvzjfxmwmyx-system-crontab.drv
  /nix/store/pmlad3pwjkizzvribvvhrm83ycci3ifh-etc.drv
  /nix/store/sgvs4zpwnrdhrclyy4l4hx97i51swvh6-nixos-manpages.drv
  /nix/store/wp1wy9ir71bax1vcaa3zjc8n1s704slx-system.drv
....{no more derivations here; no downloads either}


So did I miss something here? What is the recommended method of specifying
a different version for a system service?

Bryce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120203/1d123aae/attachment-0001.html 


More information about the nix-dev mailing list