Skip to content

Commit 54cdaee

Browse files
wolfgangwalthertm-drtina
authored andcommitted
postgresql.withPackages: support withJIT and withoutJIT
This allows using postgresql.withPackages in the nixos module, which calls withJIT and without JIT. Supersedes NixOS#351968
1 parent 92ddce7 commit 54cdaee

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

pkgs/servers/sql/postgresql/generic.nix

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ let
228228
withPackages = postgresqlWithPackages {
229229
inherit makeWrapper buildEnv;
230230
postgresql = this;
231-
}
232-
this.pkgs;
231+
};
233232

234233
tests = {
235234
postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix {
@@ -272,9 +271,9 @@ let
272271
};
273272
});
274273

275-
postgresqlWithPackages = { postgresql, makeWrapper, buildEnv }: pkgs: f: buildEnv {
276-
name = "postgresql-and-plugins-${postgresql.version}";
277-
paths = f pkgs ++ [
274+
postgresqlWithPackages = { postgresql, makeWrapper, buildEnv }: f: buildEnv {
275+
name = "${postgresql.pname}-and-plugins-${postgresql.version}";
276+
paths = f postgresql.pkgs ++ [
278277
postgresql
279278
postgresql.lib
280279
postgresql.man # in case user installs this into environment
@@ -299,6 +298,14 @@ let
299298

300299
passthru.version = postgresql.version;
301300
passthru.psqlSchema = postgresql.psqlSchema;
301+
passthru.withJIT = postgresqlWithPackages {
302+
inherit buildEnv makeWrapper;
303+
postgresql = postgresql.withJIT;
304+
} f;
305+
passthru.withoutJIT = postgresqlWithPackages {
306+
inherit buildEnv makeWrapper;
307+
postgresql = postgresql.withoutJIT;
308+
} f;
302309
};
303310

304311
in

0 commit comments

Comments
 (0)