mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] Reapply "postgresql: fix overrides being forgotten on withPackages" (#537761)
This commit is contained in:
commit
44c9218d73
2 changed files with 54 additions and 54 deletions
|
|
@ -23,7 +23,7 @@ let
|
|||
let
|
||||
attrName = if jitSupport then "${version}_jit" else version;
|
||||
postgresql = import path { inherit self; };
|
||||
attrValue = if jitSupport then postgresql.withJIT else postgresql.withoutJIT;
|
||||
attrValue = if jitSupport then postgresql.withJIT else postgresql;
|
||||
in
|
||||
self.lib.nameValuePair attrName attrValue
|
||||
) versions;
|
||||
|
|
|
|||
|
|
@ -551,65 +551,65 @@ let
|
|||
(withBlocksize == null && withWalBlocksize == null);
|
||||
installCheckTarget = "check-world";
|
||||
|
||||
passthru =
|
||||
let
|
||||
this = self.callPackage generic args;
|
||||
in
|
||||
{
|
||||
inherit dlSuffix;
|
||||
passthru = {
|
||||
inherit dlSuffix;
|
||||
|
||||
psqlSchema = lib.versions.major version;
|
||||
psqlSchema = lib.versions.major version;
|
||||
|
||||
withJIT = if jitSupport then this.withPackages (_: [ this.jit ]) else null;
|
||||
withoutJIT = this;
|
||||
withJIT =
|
||||
if jitSupport then
|
||||
finalAttrs.finalPackage.withPackages (_: [ finalAttrs.finalPackage.jit ])
|
||||
else
|
||||
null;
|
||||
withoutJIT = finalAttrs.finalPackage.withPackages (_: [ ]);
|
||||
|
||||
pkgs =
|
||||
let
|
||||
scope = {
|
||||
inherit
|
||||
jitSupport
|
||||
pythonSupport
|
||||
perlSupport
|
||||
tclSupport
|
||||
;
|
||||
inherit (llvmPackages) llvm;
|
||||
postgresql = this;
|
||||
stdenv = stdenv';
|
||||
postgresqlTestExtension = newSuper.callPackage ./postgresqlTestExtension.nix { };
|
||||
postgresqlBuildExtension = newSuper.callPackage ./postgresqlBuildExtension.nix { };
|
||||
};
|
||||
newSelf = self // scope;
|
||||
newSuper = {
|
||||
callPackage = newScope (scope // this.pkgs);
|
||||
};
|
||||
in
|
||||
import ./ext.nix newSelf newSuper;
|
||||
|
||||
withPackages = postgresqlWithPackages {
|
||||
inherit buildEnv lib makeBinaryWrapper;
|
||||
postgresql = this;
|
||||
};
|
||||
|
||||
pg_config = buildPackages.callPackage ./pg_config.nix {
|
||||
inherit (finalAttrs) finalPackage;
|
||||
outputs = {
|
||||
out = lib.getOutput "out" finalAttrs.finalPackage;
|
||||
man = lib.getOutput "man" finalAttrs.finalPackage;
|
||||
pkgs =
|
||||
let
|
||||
scope = {
|
||||
inherit
|
||||
jitSupport
|
||||
pythonSupport
|
||||
perlSupport
|
||||
tclSupport
|
||||
;
|
||||
inherit (llvmPackages) llvm;
|
||||
postgresql = finalAttrs.finalPackage;
|
||||
stdenv = stdenv';
|
||||
postgresqlTestExtension = newSuper.callPackage ./postgresqlTestExtension.nix { };
|
||||
postgresqlBuildExtension = newSuper.callPackage ./postgresqlBuildExtension.nix { };
|
||||
};
|
||||
};
|
||||
newSelf = self // scope;
|
||||
newSuper = {
|
||||
callPackage = newScope (scope // finalAttrs.finalPackage.pkgs);
|
||||
};
|
||||
in
|
||||
import ./ext.nix newSelf newSuper;
|
||||
|
||||
tests = {
|
||||
postgresql = nixosTests.postgresql.postgresql.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-replication = nixosTests.postgresql.postgresql-replication.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-tls-client-cert = nixosTests.postgresql.postgresql-tls-client-cert.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-wal-receiver = nixosTests.postgresql.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
}
|
||||
// lib.optionalAttrs jitSupport {
|
||||
postgresql-jit = nixosTests.postgresql.postgresql-jit.passthru.override finalAttrs.finalPackage;
|
||||
withPackages = postgresqlWithPackages {
|
||||
inherit buildEnv lib makeBinaryWrapper;
|
||||
postgresql = finalAttrs.finalPackage;
|
||||
};
|
||||
|
||||
pg_config = buildPackages.callPackage ./pg_config.nix {
|
||||
inherit (finalAttrs) finalPackage;
|
||||
outputs = {
|
||||
out = lib.getOutput "out" finalAttrs.finalPackage;
|
||||
man = lib.getOutput "man" finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
tests = {
|
||||
postgresql = nixosTests.postgresql.postgresql.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-replication = nixosTests.postgresql.postgresql-replication.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-tls-client-cert = nixosTests.postgresql.postgresql-tls-client-cert.passthru.override finalAttrs.finalPackage;
|
||||
postgresql-wal-receiver = nixosTests.postgresql.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
|
||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
}
|
||||
// lib.optionalAttrs jitSupport {
|
||||
postgresql-jit = nixosTests.postgresql.postgresql-jit.passthru.override finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.postgresql.org";
|
||||
description = "Powerful, open source object-relational database system";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue