postgresql*: use underscores in version numbers

This commit is contained in:
Alyssa Ross 2018-10-23 17:22:14 +01:00
parent 94360c11e9
commit c6c7d55790
No known key found for this signature in database
GPG Key ID: C4844408C0657052
11 changed files with 33 additions and 29 deletions

View File

@ -15,7 +15,7 @@ containers.database =
{ config =
{ config, pkgs, ... }:
{ <xref linkend="opt-services.postgresql.enable"/> = true;
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql96;
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_9_6;
};
};
</programlisting>

View File

@ -197,7 +197,7 @@ swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
pkgs.emacs
];
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql10;
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_10;
</programlisting>
The latter option definition changes the default PostgreSQL package used
by NixOSs PostgreSQL service to 10.x. For more information on packages,

View File

@ -55,7 +55,7 @@ in
package = mkOption {
type = types.package;
example = literalExample "pkgs.postgresql96";
example = literalExample "pkgs.postgresql_9_6";
description = ''
PostgreSQL package to use.
'';
@ -118,7 +118,7 @@ in
extraPlugins = mkOption {
type = types.listOf types.path;
default = [];
example = literalExample "[ (pkgs.postgis.override { postgresql = pkgs.postgresql94; }) ]";
example = literalExample "[ (pkgs.postgis.override { postgresql = pkgs.postgresql_9_4; }) ]";
description = ''
When this list contains elements a new store path is created.
PostgreSQL and the elements are symlinked into it. Then pg_config,
@ -167,9 +167,9 @@ in
# Note: when changing the default, make it conditional on
# system.stateVersion to maintain compatibility with existing
# systems!
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql96
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql95
else pkgs.postgresql94);
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5
else pkgs.postgresql_9_4);
services.postgresql.dataDir =
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"

View File

@ -27,12 +27,12 @@
<filename>configuration.nix</filename>:
<programlisting>
<xref linkend="opt-services.postgresql.enable"/> = true;
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql94;
<xref linkend="opt-services.postgresql.package"/> = pkgs.postgresql_9_4;
</programlisting>
Note that you are required to specify the desired version of PostgreSQL
(e.g. <literal>pkgs.postgresql94</literal>). Since upgrading your PostgreSQL
version requires a database dump and reload (see below), NixOS cannot
provide a default value for
(e.g. <literal>pkgs.postgresql_9_4</literal>). Since upgrading your
PostgreSQL version requires a database dump and reload (see below), NixOS
cannot provide a default value for
<xref linkend="opt-services.postgresql.package"/> such as the most recent
release of PostgreSQL.
</para>

View File

@ -606,7 +606,7 @@ in
{ config =
{ config, pkgs, ... }:
{ services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql96;
services.postgresql.package = pkgs.postgresql_9_6;
system.stateVersion = "17.03";
};

View File

@ -468,7 +468,7 @@ in rec {
{ services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.org";
services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql93;
services.postgresql.package = pkgs.postgresql_9_3;
environment.systemPackages = [ pkgs.php ];
});
};

View File

@ -9,7 +9,7 @@ import ./make-test.nix ({ pkgs, ...} : {
{ pkgs, ... }:
{
services.postgresql = let mypg = pkgs.postgresql10; in {
services.postgresql = let mypg = pkgs.postgresql_10; in {
enable = true;
package = mypg;
extraPlugins = [ (pkgs.postgis.override { postgresql = mypg; }) ];

View File

@ -16,7 +16,7 @@
### NixOS - usage:
==================
services.postgresql.extraPlugins = [ (pkgs.postgis.override { postgresql = pkgs.postgresql95; }) ];
services.postgresql.extraPlugins = [ (pkgs.postgis.override { postgresql = pkgs.postgresql_9_5; }) ];
### important Postgis implementation details:

View File

@ -99,31 +99,31 @@ let
in {
postgresql93 = common {
postgresql_9_3 = common {
version = "9.3.24";
psqlSchema = "9.3";
sha256 = "1a8dnv16n2rxnbwhqw7c0kjpj3xqvkpwk50kvimj4d917cxaf542";
};
postgresql94 = common {
postgresql_9_4 = common {
version = "9.4.19";
psqlSchema = "9.4";
sha256 = "12qn9h47rkn4k41gdbxkkvg0pff43k1113jmhc83f19adc1nnxq3";
};
postgresql95 = common {
postgresql_9_5 = common {
version = "9.5.14";
psqlSchema = "9.5";
sha256 = "0k8s62h6qd9p3xlx315j5irniskqsnx1nz4ir5r1yhqp07mdab1y";
};
postgresql96 = common {
postgresql_9_6 = common {
version = "9.6.10";
psqlSchema = "9.6";
sha256 = "09l4zqs74fqnazdsyln9x657mq3wsbgng9wpvq71yh26cv2sq5c6";
};
postgresql10 = common {
postgresql_10 = common {
version = "10.5";
psqlSchema = "10.0";
sha256 = "04a07jkvc5s6zgh6jr78149kcjmsxclizsqabjw44ld4j5n633kc";

View File

@ -225,7 +225,11 @@ mapAliases ({
piwik = matomo; # added 2018-01-16
pltScheme = racket; # just to be sure
poppler_qt5 = libsForQt5.poppler; # added 2015-12-19
postgresql100 = throw "deprecated 2018-10-21: use postgresql10 instead";
postgresql93 = postgresql_9_3;
postgresql94 = postgresql_9_4;
postgresql95 = postgresql_9_5;
postgresql96 = postgresql_9_6;
postgresql100 = throw "deprecated 2018-10-21: use postgresql_10 instead";
procps-ng = procps; # added 2018-06-08
prometheus-statsd-bridge = prometheus-statsd-exporter; # added 2017-08-27
pulseaudioLight = pulseaudio; # added 2018-04-25

View File

@ -13595,22 +13595,22 @@ with pkgs;
pgbouncer = callPackage ../servers/sql/pgbouncer { };
pgpool93 = pgpool.override { postgresql = postgresql93; };
pgpool94 = pgpool.override { postgresql = postgresql94; };
pgpool93 = pgpool.override { postgresql = postgresql_9_3; };
pgpool94 = pgpool.override { postgresql = postgresql_9_4; };
pgpool = callPackage ../servers/sql/pgpool {
pam = if stdenv.isLinux then pam else null;
libmemcached = null; # Detection is broken upstream
};
postgresql = postgresql96;
postgresql = postgresql_9_6;
inherit (callPackages ../servers/sql/postgresql { })
postgresql93
postgresql94
postgresql95
postgresql96
postgresql10;
postgresql_9_3
postgresql_9_4
postgresql_9_5
postgresql_9_6
postgresql_10;
postgresql_jdbc = callPackage ../servers/sql/postgresql/jdbc { };