Skip to content

Commit

Permalink
libpq: init at 17.2
Browse files Browse the repository at this point in the history
Resolves NixOS#61580
  • Loading branch information
wolfgangwalther committed Nov 28, 2024
1 parent 4cc6181 commit 862bd30
Show file tree
Hide file tree
Showing 95 changed files with 351 additions and 214 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/blockchains/lighthouse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, nodePackages
, openssl
, pkg-config
, postgresql
, libpq
, protobuf
, rustPlatform
, rust-jemalloc-sys
Expand Down Expand Up @@ -132,7 +132,7 @@ rustPlatform.buildRustPackage rec {

nativeCheckInputs = [
nodePackages.ganache
postgresql
libpq
];

passthru = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/rstudio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
, llvmPackages
, yaml-cpp
, soci
, postgresql
, libpq
, nodejs
, qmake
, server ? false # build server version
Expand Down Expand Up @@ -98,7 +98,7 @@ in
libuuid
yaml-cpp
soci
postgresql
libpq
quarto
] ++ (if server then [
sqlite.dev
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/gis/grass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
, netcdf
, pdal
, pkg-config
, postgresql
, libpq
, proj
, python311Packages
, readline
Expand Down Expand Up @@ -79,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: {
(libxml2.override { enableHttp = true; })
netcdf
pdal
postgresql
libpq
proj
readline
sqlite
Expand All @@ -106,7 +106,7 @@ stdenv.mkDerivation (finalAttrs: {
"--with-openmp"
"--with-pdal"
"--with-postgres"
"--with-postgres-libs=${postgresql.lib}/lib/"
"--with-postgres-libs=${libpq}/lib/"
"--with-proj-includes=${proj.dev}/include"
"--with-proj-libs=${proj}/lib"
"--with-proj-share=${proj}/share/proj"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/gis/qgis/unwrapped-ltr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
, ninja
, openssl
, pdal
, postgresql
, libpq
, proj
, protobuf
, python311
Expand Down Expand Up @@ -118,7 +118,7 @@ in mkDerivation rec {
netcdf
openssl
pdal
postgresql
libpq
proj
protobuf
qca-qt5
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
, ninja
, openssl
, pdal
, postgresql
, libpq
, proj
, protobuf
, python311
Expand Down Expand Up @@ -119,7 +119,7 @@ in mkDerivation rec {
netcdf
openssl
pdal
postgresql
libpq
proj
protobuf
qca-qt5
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/gis/spatialite-gui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
, lz4
, minizip
, openjpeg
, postgresql
, libpq
, proj
, sqlite
, virtualpg
Expand Down Expand Up @@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
lz4
minizip
openjpeg
postgresql
libpq
proj
sqlite
virtualpg
Expand Down
9 changes: 4 additions & 5 deletions pkgs/applications/misc/pgmodeler/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
, qmake
, qtwayland
, qtsvg
, postgresql
, libpq
, cups
, libxml2
}:
Expand All @@ -26,15 +26,14 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook copyDesktopItems ];
qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
"PGSQL_INC=${lib.getDev postgresql}/include"
"PGSQL_LIB=${lib.getLib postgresql}/lib/libpq.dylib"
"PGSQL_INC=${lib.getDev libpq}/include"
"PGSQL_LIB=${lib.getLib libpq}/lib/libpq.dylib"
"XML_INC=${libxml2.dev}/include/libxml2"
"XML_LIB=${libxml2.out}/lib/libxml2.dylib"
"PREFIX=${placeholder "out"}/Applications/pgModeler.app/Contents"
];

# todo: libpq would suffice here. Unfortunately this won't work, if one uses only postgresql.lib here.
buildInputs = [ postgresql qtsvg ]
buildInputs = [ libpq qtsvg ]
++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ cups libxml2 ];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, postgresql, autoPatchelfHook, writeScript }:
{ lib, stdenv, fetchurl, libpq, autoPatchelfHook, writeScript }:

let
arch = if stdenv.hostPlatform.is64bit then "amd64" else "x86";
Expand All @@ -13,7 +13,7 @@ in stdenv.mkDerivation rec {
else "sha256-aMEDOnvBeKfzG8lDFhU8I5DYgG53IsCDBMV2MUyJi2g=";
};

buildInputs = [ stdenv.cc.cc postgresql.lib ];
buildInputs = [ stdenv.cc.cc libpq ];

nativeBuildInputs = [ autoPatchelfHook ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/p2p/gnunet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, makeWrapper, ncurses, pkg-config, libxml2, sqlite, zlib
, libpulseaudio, libopus, libogg, jansson, libsodium

, postgresqlSupport ? true, postgresql }:
, postgresqlSupport ? true, libpq }:

stdenv.mkDerivation rec {
pname = "gnunet";
Expand All @@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
adns curl gmp gnutls libextractor libgcrypt libgnurl libidn
libmicrohttpd libunistring libxml2 ncurses gettext libsodium
sqlite zlib libpulseaudio libopus libogg jansson
] ++ lib.optional postgresqlSupport postgresql;
] ++ lib.optional postgresqlSupport libpq;

preConfigure = ''
# Brute force: since nix-worker chroots don't provide
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/office/kexi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
breeze-icons, karchive, kcodecs, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
kcrash, kguiaddons, ki18n, kiconthemes, kitemviews, kio, ktexteditor, ktextwidgets,
kwidgetsaddons, kxmlgui,
kdb, kproperty, kreport, lcms2, libmysqlclient, marble, postgresql
kdb, kproperty, kreport, lcms2, libmysqlclient, marble, libpq
}:

mkDerivation rec {
Expand All @@ -23,7 +23,7 @@ mkDerivation rec {
breeze-icons karchive kcodecs kcompletion kconfig kconfigwidgets kcoreaddons
kcrash kguiaddons ki18n kiconthemes kitemviews kio ktexteditor ktextwidgets
kwidgetsaddons kxmlgui
kdb kproperty kreport lcms2 libmysqlclient marble postgresql
kdb kproperty kreport lcms2 libmysqlclient marble libpq
];

propagatedUserEnvPkgs = [ kproperty ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/office/ledger-web/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, bundlerApp, bundlerUpdateScript
, withPostgresql ? true, postgresql
, withPostgresql ? true, libpq
, withSqlite ? false, sqlite
}:

Expand All @@ -8,7 +8,7 @@ bundlerApp {
gemdir = ./.;
exes = [ "ledger_web" ];

buildInputs = lib.optional withPostgresql postgresql
buildInputs = lib.optional withPostgresql libpq
++ lib.optional withSqlite sqlite;

passthru.updateScript = bundlerUpdateScript "ledger-web";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/office/libreoffice/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
, kwindowsystem ? null
, variant ? "fresh"
, symlinkJoin
, postgresql
, libpq
, makeFontsConf
, amiri
, caladea
Expand Down Expand Up @@ -395,7 +395,7 @@ in stdenv.mkDerivation (finalAttrs: {
pam
perl
poppler
postgresql
libpq
python311
sane-backends
unixODBC
Expand Down
4 changes: 2 additions & 2 deletions pkgs/build-support/rust/default-crate-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
, openssl
, pango
, pkg-config
, postgresql
, libpq
, protobuf
, python3
, rdkafka
Expand Down Expand Up @@ -259,7 +259,7 @@ in

pq-sys = attr: {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ postgresql ];
buildInputs = [ libpq ];
};

prost-build = attr: {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/al/algol68g/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
, mpfr
, ncurses
, plotutils
, postgresql
, libpq
, pkg-config
, withPDFDoc ? true
}:
Expand All @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
gmp
gsl
plotutils
postgresql
libpq
];

strictDeps = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cp/cppdb/package.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, cmake, sqlite, libmysqlclient, postgresql, unixODBC }:
{ lib, stdenv, fetchurl, cmake, sqlite, libmysqlclient, libpq, unixODBC }:

stdenv.mkDerivation rec {
pname = "cppdb";
Expand All @@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};

nativeBuildInputs = [ cmake ];
buildInputs = [ sqlite libmysqlclient postgresql unixODBC ];
buildInputs = [ sqlite libmysqlclient libpq unixODBC ];

cmakeFlags = [ "--no-warn-unused-cli" ];
env.NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cy/cyrus-imapd/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
openssl,
pcre2,
perl,
postgresql,
libpq,
rsync,
shapelib,
sqlite,
Expand Down Expand Up @@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: {
xapian
]
++ lib.optionals withMySQL [ libmysqlclient ]
++ lib.optionals withPgSQL [ postgresql ]
++ lib.optionals withPgSQL [ libpq ]
++ lib.optionals withSQLite [ sqlite ];

enableParallelBuilding = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/di/diesel-cli/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
nix-update-script,
openssl,
pkg-config,
postgresql,
libpq,
sqlite,
testers,
zlib,
Expand Down Expand Up @@ -47,7 +47,7 @@ rustPlatform.buildRustPackage rec {
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security
++ lib.optional (stdenv.hostPlatform.isDarwin && mysqlSupport) libiconv
++ lib.optional sqliteSupport sqlite
++ lib.optional postgresqlSupport postgresql
++ lib.optional postgresqlSupport libpq
++ lib.optionals mysqlSupport [
libmysqlclient
zlib
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/dr/drogon/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, openssl, brotli, c-ares
# optional databases
, sqliteSupport ? true, sqlite
, postgresSupport ? false, postgresql
, postgresSupport ? false, libpq
, redisSupport ? false, hiredis
, mysqlSupport ? false, libmysqlclient, mariadb }:

Expand Down Expand Up @@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
brotli
c-ares
] ++ lib.optional sqliteSupport sqlite
++ lib.optional postgresSupport postgresql
++ lib.optional postgresSupport libpq
++ lib.optional redisSupport hiredis
# drogon uses mariadb for mysql (see https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#Library-Dependencies)
++ lib.optionals mysqlSupport [ libmysqlclient mariadb ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/ds/dspam/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, gawk, gnused, gnugrep, coreutils, which
, perlPackages
, withMySQL ? false, zlib, mariadb-connector-c
, withPgSQL ? false, postgresql
, withPgSQL ? false, libpq
, withSQLite ? false, sqlite
, withDB ? false, db
}:
Expand Down Expand Up @@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {

buildInputs = [ perlPackages.perl ]
++ lib.optionals withMySQL [ zlib mariadb-connector-c.out ]
++ lib.optional withPgSQL postgresql
++ lib.optional withPgSQL libpq
++ lib.optional withSQLite sqlite
++ lib.optional withDB db;
nativeBuildInputs = [ makeWrapper ];
Expand Down Expand Up @@ -62,7 +62,7 @@ in stdenv.mkDerivation rec {
"--with-mysql-includes=${mariadb-connector-c.dev}/include/mysql"
"--with-mysql-libraries=${mariadb-connector-c.out}/lib/mysql"
]
++ lib.optional withPgSQL "--with-pgsql-libraries=${postgresql.lib}/lib";
++ lib.optional withPgSQL "--with-pgsql-libraries=${libpq}/lib";

# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/ex/exim/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, procps, killall
, enableLDAP ? false, openldap
, enableMySQL ? false, libmysqlclient, zlib
, enablePgSQL ? false, postgresql
, enablePgSQL ? false, libpq
, enableSqlite ? false, sqlite
, enableAuthDovecot ? false, dovecot
, enablePAM ? false, pam
Expand All @@ -30,7 +30,7 @@ in stdenv.mkDerivation rec {
buildInputs = [ coreutils db openssl perl' pcre2 libxcrypt ]
++ lib.optional enableLDAP openldap
++ lib.optionals enableMySQL [ libmysqlclient zlib ]
++ lib.optional enablePgSQL postgresql
++ lib.optional enablePgSQL libpq
++ lib.optionals enableSqlite [ sqlite sqlite.dev zlib ]
++ lib.optional enableAuthDovecot dovecot
++ lib.optional enablePAM pam
Expand Down Expand Up @@ -80,8 +80,8 @@ in stdenv.mkDerivation rec {
''}
${lib.optionalString enablePgSQL ''
s:^# \(LOOKUP_PGSQL=yes\)$:\1:
s:^\(LOOKUP_LIBS\)=\(.*\):\1=\2 -lpq -L${postgresql.lib}/lib:
s:^# \(LOOKUP_LIBS\)=.*:\1=-lpq -L${postgresql.lib}/lib:
s:^\(LOOKUP_LIBS\)=\(.*\):\1=\2 -lpq -L${libpq}/lib:
s:^# \(LOOKUP_LIBS\)=.*:\1=-lpq -L${libpq}/lib:
''}
${lib.optionalString enableSqlite ''
s:^# \(LOOKUP_SQLITE=yes\)$:\1:
Expand Down
Loading

0 comments on commit 862bd30

Please sign in to comment.