mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
Merge pull request #336994 from wolfgangwalther/pg-config-dev
treewide: fix pg_config / postgresql headers moved to dev output
This commit is contained in:
commit
34bca7dea6
@ -154,7 +154,7 @@ let
|
||||
defaultGemConfig = pkgs.defaultGemConfig // {
|
||||
pg = attrs: {
|
||||
buildFlags =
|
||||
[ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
|
||||
[ "--with-pg-config=${lib.getDev pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -172,7 +172,7 @@ let
|
||||
gemConfig = pkgs.defaultGemConfig // {
|
||||
pg = attrs: {
|
||||
buildFlags =
|
||||
[ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
|
||||
[ "--with-pg-config=${lib.getDev pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -190,9 +190,7 @@ let
|
||||
defaultGemConfig = super.defaultGemConfig // {
|
||||
pg = attrs: {
|
||||
buildFlags = [
|
||||
"--with-pg-config=${
|
||||
pkgs."postgresql_${pg_version}"
|
||||
}/bin/pg_config"
|
||||
"--with-pg-config=${lib.getDev pkgs."postgresql_${pg_version}"}/bin/pg_config"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -24,8 +24,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook ];
|
||||
qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ] ++ lib.optionals stdenv.isDarwin [
|
||||
"PGSQL_INC=${postgresql}/include"
|
||||
"PGSQL_LIB=${postgresql.lib}/lib/libpq.dylib"
|
||||
"PGSQL_INC=${lib.getDev postgresql}/include"
|
||||
"PGSQL_LIB=${lib.getLib postgresql}/lib/libpq.dylib"
|
||||
"XML_INC=${libxml2.dev}/include/libxml2"
|
||||
"XML_LIB=${libxml2.out}/lib/libxml2.dylib"
|
||||
"PREFIX=${placeholder "out"}/Applications/pgModeler.app/Contents"
|
||||
|
@ -74,7 +74,7 @@ let
|
||||
];
|
||||
gemConfig = defaultGemConfig // {
|
||||
pg = attrs: {
|
||||
buildFlags = [ "--with-pg-config=${postgresql}/bin/pg_config" ];
|
||||
buildFlags = [ "--with-pg-config=${lib.getDev postgresql}/bin/pg_config" ];
|
||||
};
|
||||
rszr = attrs: {
|
||||
buildInputs = [ imlib2 imlib2.dev ];
|
||||
|
@ -20,7 +20,6 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [ "--with-openssl=${openssl.dev}" ];
|
||||
|
||||
preConfigure = ''
|
||||
export PGHEADER="${postgresql}/include/libpq-fe.h";
|
||||
export MSHEADER="${libmysqlclient}/include/mysql/mysql.h";
|
||||
export SQHEADER="${sqlite.dev}/include/sqlite3.h";
|
||||
export ICU_INCLUDES="-I${icu.dev}/include";
|
||||
|
@ -42,8 +42,6 @@ stdenv.mkDerivation rec {
|
||||
"--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
|
||||
] ++ lib.optionals (postgresql != null) [
|
||||
"--with-pgsql"
|
||||
"--with-pgsql_incdir=${postgresql}/include"
|
||||
"--with-pgsql_libdir=${postgresql.lib}/lib"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = ''
|
||||
export CPPFLAGS="-I${getDev libmysqlclient}/include/mysql"
|
||||
export LDFLAGS="-L${libmysqlclient}/lib/mysql -L${postgresql}/lib"
|
||||
export LDFLAGS="-L${libmysqlclient}/lib/mysql"
|
||||
configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
|
||||
'';
|
||||
|
||||
|
@ -74,11 +74,16 @@ let
|
||||
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
# needed to find pg_config with strictDeps
|
||||
postgresql
|
||||
setuptools
|
||||
tomli
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
postgresql
|
||||
];
|
||||
|
||||
# tested in psycopg
|
||||
doCheck = false;
|
||||
|
||||
|
@ -37,7 +37,7 @@ buildPythonPackage rec {
|
||||
# some linker flags are added but the linker ignores them because they're incompatible
|
||||
# https://github.com/psycopg/psycopg2/blob/89005ac5b849c6428c05660b23c5a266c96e677d/setup.py
|
||||
substituteInPlace setup.py \
|
||||
--replace "self.pg_config_exe = self.build_ext.pg_config" 'self.pg_config_exe = "${lib.getExe' buildPackages.postgresql "pg_config"}"'
|
||||
--replace-fail "self.pg_config_exe = self.build_ext.pg_config" 'self.pg_config_exe = "${lib.getDev buildPackages.postgresql}/bin/pg_config"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -671,7 +671,7 @@ in
|
||||
# Force pkg-config lookup for libpq.
|
||||
# See https://github.com/ged/ruby-pg/blob/6629dec6656f7ca27619e4675b45225d9e422112/ext/extconf.rb#L34-L55
|
||||
#
|
||||
# Note that setting --with-pg-config=${postgresql}/bin/pg_config would add
|
||||
# Note that setting --with-pg-config=${lib.getDev postgresql}/bin/pg_config would add
|
||||
# an unnecessary reference to the entire postgresql package.
|
||||
buildFlags = [ "--with-pg-config=ignore" ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
@ -86,7 +86,7 @@ let
|
||||
preBuildAndTest = ''
|
||||
export PGRX_HOME=$(mktemp -d)
|
||||
export PGDATA="$PGRX_HOME/data-${pgrxPostgresMajor}/"
|
||||
cargo-pgrx pgrx init "--pg${pgrxPostgresMajor}" ${postgresql}/bin/pg_config
|
||||
cargo-pgrx pgrx init "--pg${pgrxPostgresMajor}" ${lib.getDev postgresql}/bin/pg_config
|
||||
echo "unix_socket_directories = '$(mktemp -d)'" > "$PGDATA/postgresql.conf"
|
||||
|
||||
# This is primarily for Mac or other Nix systems that don't use the nixbld user.
|
||||
@ -120,7 +120,7 @@ let
|
||||
PGRX_BUILD_FLAGS="--frozen -j $NIX_BUILD_CORES ${builtins.concatStringsSep " " cargoBuildFlags}" \
|
||||
${lib.optionalString stdenv.isDarwin ''RUSTFLAGS="''${RUSTFLAGS:+''${RUSTFLAGS} }-Clink-args=-Wl,-undefined,dynamic_lookup"''} \
|
||||
cargo pgrx package \
|
||||
--pg-config ${postgresql}/bin/pg_config \
|
||||
--pg-config ${lib.getDev postgresql}/bin/pg_config \
|
||||
${maybeDebugFlag} \
|
||||
--features "${builtins.concatStringsSep " " buildFeatures}" \
|
||||
--out-dir "$out"
|
||||
|
@ -82,7 +82,6 @@ in stdenv.mkDerivation rec {
|
||||
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_INCLUDE\)=.*:\1=-I${postgresql}/include:
|
||||
''}
|
||||
${lib.optionalString enableSqlite ''
|
||||
s:^# \(LOOKUP_SQLITE=yes\)$:\1:
|
||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
||||
echo -e "include Makefile\nfiles:\n\t@echo \$(REGRESS)" > Makefile.regress
|
||||
REGRESS_TESTS=$(make -f Makefile.regress files)
|
||||
|
||||
${postgresql}/lib/pgxs/src/test/regress/pg_regress \
|
||||
${lib.getDev postgresql}/lib/pgxs/src/test/regress/pg_regress \
|
||||
--inputdir=./ \
|
||||
--bindir='${postgresqlAge}/bin' \
|
||||
--encoding=UTF-8 \
|
||||
|
@ -112,7 +112,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
echo -e "include Makefile\nprint_regress_files:\n\t@echo \$(REGRESS)" > Makefile.regress
|
||||
REGRESS_TESTS=$(make -f Makefile.regress print_regress_files)
|
||||
|
||||
${postgresql}/lib/pgxs/src/test/regress/pg_regress \
|
||||
${lib.getDev postgresql}/lib/pgxs/src/test/regress/pg_regress \
|
||||
--bindir='${postgresqlWithSelf}/bin' \
|
||||
--temp-instance=regress-instance \
|
||||
--dbname=contrib_regression \
|
||||
|
@ -18,10 +18,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local/pgsql ${postgresql} \
|
||||
--replace -L/usr/local/lib "" \
|
||||
--replace -I/usr/local/include ""
|
||||
substituteInPlace tsja.c --replace /usr/local/lib/mecab ${mecab}/lib/mecab
|
||||
--replace-fail /usr/local/pgsql ${lib.getDev postgresql} \
|
||||
--replace-fail -L/usr/local/lib "" \
|
||||
--replace-fail -I/usr/local/include ""
|
||||
substituteInPlace tsja.c --replace-fail /usr/local/lib/mecab ${mecab}/lib/mecab
|
||||
'';
|
||||
|
||||
buildInputs = [ mecab postgresql ];
|
||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [
|
||||
"--with-sqlite3=${sqlite.dev}"
|
||||
"--with-postgresql=${postgresql}"
|
||||
"--with-postgresql=${lib.getDev postgresql}"
|
||||
"--with-logdir=/var/log/bacula"
|
||||
"--with-working-dir=/var/lib/bacula"
|
||||
"--mandir=\${out}/share/man"
|
||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
|
||||
"--localstatedir=/var"
|
||||
"--with-openssl=${lib.getDev openssl}"
|
||||
]
|
||||
++ lib.optional withPostgres "--with-pgsql=${postgresql}/bin/pg_config"
|
||||
++ lib.optional withPostgres "--with-pgsql=${lib.getDev postgresql}/bin/pg_config"
|
||||
++ lib.optional withMysql "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config";
|
||||
|
||||
postConfigure = ''
|
||||
|
@ -586,7 +586,7 @@ in {
|
||||
{
|
||||
name = "pdo_pgsql";
|
||||
internalDeps = [ php.extensions.pdo ];
|
||||
configureFlags = [ "--with-pdo-pgsql=${postgresql}" ];
|
||||
configureFlags = [ "--with-pdo-pgsql=${lib.getDev postgresql}" ];
|
||||
doCheck = false;
|
||||
}
|
||||
{
|
||||
@ -599,7 +599,7 @@ in {
|
||||
{
|
||||
name = "pgsql";
|
||||
buildInputs = [ pcre2 ];
|
||||
configureFlags = [ "--with-pgsql=${postgresql}" ];
|
||||
configureFlags = [ "--with-pgsql=${lib.getDev postgresql}" ];
|
||||
doCheck = false;
|
||||
}
|
||||
{ name = "posix"; doCheck = false; }
|
||||
|
Loading…
Reference in New Issue
Block a user