Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql: enable more features #218934

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkgs/servers/sql/postgresql/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
# dependencies
{ stdenv, lib, fetchurl, makeWrapper
, glibc, zlib, readline, openssl, icu, lz4, zstd, systemd, libossp_uuid
, pkg-config, libxml2, tzdata, libkrb5
, pkg-config, libxml2, tzdata, libkrb5, pam, openldap, llvmPackages_latest

# 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
Expand All @@ -23,6 +23,7 @@ let
atLeast = lib.versionAtLeast version;
lz4Enabled = atLeast "14";
zstdEnabled = atLeast "15";
llvmEnabled = atLeast "13";

in stdenv.mkDerivation rec {
pname = "postgresql";
Expand All @@ -44,11 +45,14 @@ let
openssl
libxml2
icu
pam
openldap
]
++ lib.optionals lz4Enabled [ lz4 ]
++ lib.optionals zstdEnabled [ zstd ]
++ lib.optionals enableSystemd [ systemd ]
++ lib.optionals gssSupport [ libkrb5 ]
++ lib.optionals llvmEnabled [ llvmPackages_latest.llvm llvmPackages_latest.clang ]
++ lib.optionals (!stdenv.isDarwin) [ libossp_uuid ];

nativeBuildInputs = [
Expand All @@ -68,17 +72,19 @@ let
preConfigure = "CC=${stdenv.cc.targetPrefix}cc";

configureFlags = [
"--with-pam"
"--with-ldap"
"--with-openssl"
"--with-libxml"
"--with-icu"
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
"--with-system-tzdata=${tzdata}/share/zoneinfo"
"--enable-debug"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing that should come with a motivation.

(lib.optionalString enableSystemd "--with-systemd")
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
] ++ lib.optionals lz4Enabled [ "--with-lz4" ]
++ lib.optionals zstdEnabled [ "--with-zstd" ]
++ lib.optionals llvmEnabled [ "--with-llvm" ]
++ lib.optionals gssSupport [ "--with-gssapi" ]
++ lib.optionals stdenv.hostPlatform.isRiscV [ "--disable-spinlocks" ];

Expand Down