postgresql: rename enableSystemd to systemdSupport for consistency

We have gssSupport, jitSupport and pythonSupport - but enableSystemd?

Across nixpkgs there are currently three styles commonly used, about equally
often: withX, xSupport and enableX.

Let's at least use one consistent style in this package.
This commit is contained in:
Wolfgang Walther 2024-03-12 21:16:33 +01:00
parent d7ae1c5143
commit e6bfabf366
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1

View File

@ -8,7 +8,8 @@ let
, linux-pam
# This is important to obtain a version of `libpq` that does not depend on systemd.
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd && !stdenv.hostPlatform.isStatic
, enableSystemd ? null
, gssSupport ? with stdenv.hostPlatform; !isWindows && !isStatic
# for postgresql.pkgs
@ -39,6 +40,8 @@ let
lz4Enabled = atLeast "14";
zstdEnabled = atLeast "15";
systemdSupport' = if enableSystemd == null then systemdSupport else (lib.warn "postgresql: argument enableSystemd is deprecated, please use systemdSupport instead." enableSystemd);
pname = "postgresql";
stdenv' = if jitSupport then llvmPackages.stdenv else stdenv;
@ -66,7 +69,7 @@ let
++ lib.optionals jitSupport [ llvmPackages.llvm ]
++ lib.optionals lz4Enabled [ lz4 ]
++ lib.optionals zstdEnabled [ zstd ]
++ lib.optionals enableSystemd [ systemd ]
++ lib.optionals systemdSupport' [ systemd ]
++ lib.optionals pythonSupport [ python3 ]
++ lib.optionals gssSupport [ libkrb5 ]
++ lib.optionals stdenv'.isLinux [ linux-pam ]
@ -97,7 +100,7 @@ let
"--libdir=$(lib)/lib"
"--with-system-tzdata=${tzdata}/share/zoneinfo"
"--enable-debug"
(lib.optionalString enableSystemd "--with-systemd")
(lib.optionalString systemdSupport' "--with-systemd")
(if stdenv'.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
] ++ lib.optionals lz4Enabled [ "--with-lz4" ]
++ lib.optionals zstdEnabled [ "--with-zstd" ]