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