mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-19 16:40:32 +03:00
nixos/postgresql: warn about unstable status
This commit is contained in:
parent
abc5cff372
commit
82248a6f7a
1 changed files with 14 additions and 0 deletions
|
@ -637,6 +637,20 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
warnings = (
|
||||
let
|
||||
unstableState =
|
||||
if lib.hasInfix "beta" cfg.package.version then
|
||||
"in beta"
|
||||
else if lib.hasInfix "rc" cfg.package.version then
|
||||
"a release candidate"
|
||||
else
|
||||
null;
|
||||
in
|
||||
lib.optional (unstableState != null)
|
||||
"PostgreSQL ${lib.versions.major cfg.package.version} is currently ${unstableState}, and is not advised for use in production environments."
|
||||
);
|
||||
|
||||
assertions = map (
|
||||
{ name, ensureDBOwnership, ... }:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue