Skip to content

Commit

Permalink
postgresql.withPackages: support withJIT and withoutJIT
Browse files Browse the repository at this point in the history
This allows using postgresql.withPackages in the nixos module, which
calls withJIT and without JIT.

Supersedes #351968
  • Loading branch information
wolfgangwalther committed Oct 29, 2024
1 parent 3e46dff commit 6cc9178
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkgs/servers/sql/postgresql/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ let
withPackages = postgresqlWithPackages {
inherit buildEnv;
postgresql = this;
}
this.pkgs;
};

tests = {
postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix {
Expand Down Expand Up @@ -323,9 +322,9 @@ let
};
});

postgresqlWithPackages = { postgresql, buildEnv }: pkgs: f: buildEnv {
name = "postgresql-and-plugins-${postgresql.version}";
paths = f pkgs ++ [
postgresqlWithPackages = { postgresql, buildEnv }: f: buildEnv {
name = "${postgresql.pname}-and-plugins-${postgresql.version}";
paths = f postgresql.pkgs ++ [
postgresql
postgresql.man # in case user installs this into environment
];
Expand All @@ -334,6 +333,14 @@ let

passthru.version = postgresql.version;
passthru.psqlSchema = postgresql.psqlSchema;
passthru.withJIT = postgresqlWithPackages {
inherit buildEnv;
postgresql = postgresql.withJIT;
} f;
passthru.withoutJIT = postgresqlWithPackages {
inherit buildEnv;
postgresql = postgresql.withoutJIT;
} f;
};

in
Expand Down

0 comments on commit 6cc9178

Please sign in to comment.