mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
various: switch to lighter libpq package instead of postgresql
No need for the full server package when you only need libpq.
This commit is contained in:
parent
2820972779
commit
7dbeb1be3a
9 changed files with 17 additions and 26 deletions
|
@ -210,7 +210,7 @@ in
|
|||
poke = addPackageRequires super.poke [ self.poke-mode ];
|
||||
|
||||
pq = super.pq.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs or [ ] ++ [ pkgs.postgresql ];
|
||||
buildInputs = old.buildInputs or [ ] ++ [ pkgs.libpq ];
|
||||
});
|
||||
|
||||
preview-auto = mkHome super.preview-auto;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
withIDN ? true,
|
||||
libidn,
|
||||
withPostgreSQL ? false,
|
||||
postgresql,
|
||||
libpq,
|
||||
withSQLite ? true,
|
||||
sqlite,
|
||||
withUDNS ? true,
|
||||
|
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
|
|||
botan2
|
||||
]
|
||||
++ lib.optional withIDN libidn
|
||||
++ lib.optional withPostgreSQL postgresql
|
||||
++ lib.optional withPostgreSQL libpq
|
||||
++ lib.optional withSQLite sqlite
|
||||
++ lib.optional withUDNS udns;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
libmysqlclient,
|
||||
log4cplus,
|
||||
openssl,
|
||||
postgresql,
|
||||
libpq,
|
||||
python3,
|
||||
|
||||
# tests
|
||||
|
@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
|
|||
"--localstatedir=/var"
|
||||
"--with-openssl=${lib.getDev openssl}"
|
||||
]
|
||||
++ lib.optional withPostgres "--with-pgsql=${lib.getDev postgresql}/bin/pg_config"
|
||||
++ lib.optional withPostgres "--with-pgsql=${lib.getDev libpq}/bin/pg_config"
|
||||
++ lib.optional withMysql "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config";
|
||||
|
||||
postConfigure = ''
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
libbsd,
|
||||
ncurses,
|
||||
postgresql,
|
||||
libpq,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
|
@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [
|
||||
libbsd
|
||||
libpq
|
||||
ncurses
|
||||
postgresql
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -146,7 +146,7 @@ in
|
|||
);
|
||||
openssl = addToBuildInputs pkgs.openssl;
|
||||
plot = addToBuildInputs pkgs.plotutils;
|
||||
postgresql = addToBuildInputsWithPkgConfig pkgs.postgresql;
|
||||
postgresql = addToBuildInputsWithPkgConfig pkgs.libpq;
|
||||
rocksdb = addToBuildInputs pkgs.rocksdb_8_3;
|
||||
scheme2c-compatibility = addPkgConfig;
|
||||
sdl-base =
|
||||
|
|
|
@ -59,7 +59,7 @@ let
|
|||
nativeLibs = [ pkgs.mariadb.client ];
|
||||
});
|
||||
clsql-postgresql = super.clsql-postgresql.overrideLispAttrs (o: {
|
||||
nativeLibs = [ pkgs.postgresql.lib ];
|
||||
nativeLibs = [ pkgs.libpq ];
|
||||
});
|
||||
clsql-sqlite3 = super.clsql-sqlite3.overrideLispAttrs (o: {
|
||||
nativeLibs = [ pkgs.sqlite ];
|
||||
|
|
|
@ -335,7 +335,6 @@ let
|
|||
};
|
||||
|
||||
packagesWithNativeBuildInputs = {
|
||||
adbcpostgresql = [ pkgs.postgresql ];
|
||||
adimpro = [ pkgs.imagemagick ];
|
||||
animation = [ pkgs.which ];
|
||||
Apollonius = with pkgs; [ pkg-config gmp.dev mpfr.dev ];
|
||||
|
@ -484,8 +483,7 @@ let
|
|||
RODBC = [ pkgs.libiodbc ];
|
||||
rpanel = [ pkgs.tclPackages.bwidget ];
|
||||
Rpoppler = [ pkgs.poppler ];
|
||||
RPostgres = with pkgs; [ postgresql ];
|
||||
RPostgreSQL = with pkgs; [ postgresql postgresql ];
|
||||
RPostgreSQL = with pkgs; [ libpq ];
|
||||
RProtoBuf = [ pkgs.protobuf ];
|
||||
RSclient = [ pkgs.openssl.dev ];
|
||||
Rserve = [ pkgs.openssl ];
|
||||
|
@ -614,7 +612,7 @@ let
|
|||
|
||||
packagesWithBuildInputs = {
|
||||
# sort -t '=' -k 2
|
||||
adbcpostgresql = with pkgs; [ readline.dev zlib.dev openssl.dev libkrb5.dev openpam ];
|
||||
adbcpostgresql = with pkgs; [ readline.dev zlib.dev openssl.dev libkrb5.dev openpam libpq ];
|
||||
asciicast = with pkgs; [ xz.dev bzip2.dev zlib.dev icu.dev libdeflate ];
|
||||
island = [ pkgs.gsl.dev ];
|
||||
svKomodo = [ pkgs.which ];
|
||||
|
@ -646,6 +644,7 @@ let
|
|||
RGtk2 = [ pkgs.pkg-config ];
|
||||
RProtoBuf = [ pkgs.pkg-config ];
|
||||
Rpoppler = [ pkgs.pkg-config ];
|
||||
RPostgres = with pkgs; [ libpq ];
|
||||
XML = [ pkgs.pkg-config ];
|
||||
apsimx = [ pkgs.which ];
|
||||
cairoDevice = [ pkgs.pkg-config ];
|
||||
|
@ -1625,14 +1624,6 @@ let
|
|||
enableParallelBuilding = false;
|
||||
});
|
||||
|
||||
RPostgres = old.RPostgres.overrideAttrs (attrs: {
|
||||
preConfigure = ''
|
||||
export INCLUDE_DIR=${pkgs.postgresql}/include
|
||||
export LIB_DIR=${pkgs.postgresql.lib}/lib
|
||||
patchShebangs configure
|
||||
'';
|
||||
});
|
||||
|
||||
OpenMx = old.OpenMx.overrideAttrs (attrs: {
|
||||
env = (attrs.env or { }) // {
|
||||
# needed to avoid "log limit exceeded" on Hydra
|
||||
|
|
|
@ -42,7 +42,7 @@ mkDerivation {
|
|||
loki
|
||||
libmysqlclient
|
||||
openssl
|
||||
postgresql
|
||||
postgresql # needs libecpg, which is not available in libpq package
|
||||
qscintilla
|
||||
qtbase
|
||||
];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
shared-mime-info,
|
||||
xz,
|
||||
mariadb,
|
||||
postgresql,
|
||||
libpq,
|
||||
sqlite,
|
||||
backend ? "mysql",
|
||||
}:
|
||||
|
@ -32,7 +32,7 @@ mkKdeDerivation {
|
|||
"-DMYSQLD_SCRIPTS_PATH=${lib.getBin mariadb}/bin"
|
||||
]
|
||||
++ lib.optionals (backend == "postgres") [
|
||||
"-DPOSTGRES_PATH=${lib.getBin postgresql}/bin"
|
||||
"-DPOSTGRES_PATH=${lib.getBin libpq}/bin"
|
||||
];
|
||||
|
||||
extraNativeBuildInputs = [
|
||||
|
@ -47,7 +47,7 @@ mkKdeDerivation {
|
|||
xz
|
||||
]
|
||||
++ lib.optionals (backend == "mysql") [ mariadb ]
|
||||
++ lib.optionals (backend == "postgres") [ postgresql ]
|
||||
++ lib.optionals (backend == "postgres") [ libpq ]
|
||||
++ lib.optionals (backend == "sqlite") [ sqlite ];
|
||||
|
||||
# Hardcoded as a QString, which is UTF-16 so Nix can't pick it up automatically
|
||||
|
@ -60,6 +60,6 @@ mkKdeDerivation {
|
|||
echo "${mariadb}" > $out/nix-support/depends
|
||||
''
|
||||
+ lib.optionalString (backend == "postgres") ''
|
||||
echo "${postgresql}" > $out/nix-support/depends
|
||||
echo "${libpq}" > $out/nix-support/depends
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue