summary refs log tree commit diff
diff options
context:
space:
mode:
authorajs124 <git@ajs124.de>2021-12-03 01:00:48 +0100
committerajs124 <git@ajs124.de>2021-12-03 01:14:29 +0100
commit757dd008b2f2926fc0f7688fa8189f930ea47521 (patch)
treeb219b2bfe9a155b111ed8abff233ca292278b2f1
parent571cbf3d1db477058303cef8754fb85a14e90eb7 (diff)
downloadnixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar.gz
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar.bz2
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar.lz
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar.xz
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.tar.zst
nixpkgs-757dd008b2f2926fc0f7688fa8189f930ea47521.zip
postgresql_9_6: drop
-rw-r--r--nixos/doc/manual/administration/declarative-containers.section.md2
-rw-r--r--nixos/doc/manual/from_md/administration/declarative-containers.section.xml2
-rw-r--r--nixos/modules/services/databases/postgresql.nix8
-rw-r--r--nixos/modules/virtualisation/nixos-containers.nix4
-rw-r--r--pkgs/servers/sql/postgresql/default.nix9
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix1
7 files changed, 10 insertions, 17 deletions
diff --git a/nixos/doc/manual/administration/declarative-containers.section.md b/nixos/doc/manual/administration/declarative-containers.section.md
index 273672fc10c..0d9d4017ed8 100644
--- a/nixos/doc/manual/administration/declarative-containers.section.md
+++ b/nixos/doc/manual/administration/declarative-containers.section.md
@@ -9,7 +9,7 @@ containers.database =
   { config =
       { config, pkgs, ... }:
       { services.postgresql.enable = true;
-      services.postgresql.package = pkgs.postgresql_9_6;
+      services.postgresql.package = pkgs.postgresql_10;
       };
   };
 ```
diff --git a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml
index a918314a272..7b35520d567 100644
--- a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml
+++ b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml
@@ -11,7 +11,7 @@ containers.database =
   { config =
       { config, pkgs, ... }:
       { services.postgresql.enable = true;
-      services.postgresql.package = pkgs.postgresql_9_6;
+      services.postgresql.package = pkgs.postgresql_10;
       };
   };
 </programlisting>
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index d49cb4c51a7..2919022496a 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -289,14 +289,16 @@ in
         port = cfg.port;
       };
 
-    services.postgresql.package =
+    services.postgresql.package = let
+        mkThrow = ver: throw "postgresql_${ver} was removed, please upgrade your postgresql version.";
+    in
       # Note: when changing the default, make it conditional on
       # ‘system.stateVersion’ to maintain compatibility with existing
       # systems!
       mkDefault (if versionAtLeast config.system.stateVersion "21.11" then pkgs.postgresql_13
             else if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11
-            else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
-            else throw "postgresql_9_5 was removed, please upgrade your postgresql version.");
+            else if versionAtLeast config.system.stateVersion "17.09" then mkThrow "9_6"
+            else mkThrow "9_5");
 
     services.postgresql.dataDir = mkDefault "/var/lib/postgresql/${cfg.package.psqlSchema}";
 
diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix
index 279c9656735..0838a57f0f3 100644
--- a/nixos/modules/virtualisation/nixos-containers.nix
+++ b/nixos/modules/virtualisation/nixos-containers.nix
@@ -716,9 +716,9 @@ in
               { config =
                   { config, pkgs, ... }:
                   { services.postgresql.enable = true;
-                    services.postgresql.package = pkgs.postgresql_9_6;
+                    services.postgresql.package = pkgs.postgresql_10;
 
-                    system.stateVersion = "17.03";
+                    system.stateVersion = "21.05";
                   };
               };
           }
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index 6e5f41d6882..f854d24e8b4 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -200,15 +200,6 @@ let
 
 in self: {
 
-  postgresql_9_6 = self.callPackage generic {
-    version = "9.6.24";
-    psqlSchema = "9.6";
-    sha256 = "sha256-rrehlr4+vtGnR271ZfOXIhh8EI3UfadIm+nE/K6YKs4=";
-    this = self.postgresql_9_6;
-    thisAttr = "postgresql_9_6";
-    inherit self;
-  };
-
   postgresql_10 = self.callPackage generic {
     version = "10.19";
     psqlSchema = "10.0"; # should be 10, but changing it is invasive
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index c78e2119239..9c6e01bec93 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -718,6 +718,7 @@ mapAliases ({
   polarssl = mbedtls; # added 2018-04-25
   poppler_qt5 = libsForQt5.poppler;  # added 2015-12-19
   postgresql96 = postgresql_9_6;
+  postgresql_9_6 = throw "postgresql_9_6 has been removed from nixpkgs, as this version is no longer supported by upstream"; # added 2021-12-03
   # postgresql plugins
   pgjwt = postgresqlPackages.pgjwt;
   pg_repack = postgresqlPackages.pg_repack;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f38e73201b9..89cc203af13 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -21398,7 +21398,6 @@ with pkgs;
   timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { };
 
   inherit (import ../servers/sql/postgresql pkgs)
-    postgresql_9_6
     postgresql_10
     postgresql_11
     postgresql_12