Skip to content

Commit

Permalink
postgresql_14: fix build
Browse files Browse the repository at this point in the history
Building postgresql_14 currently fails with this on master:

  error: derivation contains an illegal reference specifier 'man'

The reason seems to be a bug in nix, where outputChecks are run
improperly when one of the outputs can already be substituted. Why the
man output can be substituted from hydra is unknown, but adding more
outputChecks for the the man and doc outputs should work around the
problem until nix is fixed.
  • Loading branch information
wolfgangwalther committed Jan 2, 2025
1 parent d169a1e commit a0919c7
Showing 1 changed file with 45 additions and 23 deletions.
68 changes: 45 additions & 23 deletions pkgs/servers/sql/postgresql/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,29 +146,51 @@ let
"lib"
"man"
];
outputChecks.out = {
disallowedReferences = [
"dev"
"doc"
"man"
];
disallowedRequisites = [
stdenv'.cc
llvmPackages.llvm.out
] ++ (map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs));
};
outputChecks.lib = {
disallowedReferences = [
"out"
"dev"
"doc"
"man"
];
disallowedRequisites = [
stdenv'.cc
llvmPackages.llvm.out
] ++ (map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs));
};
outputChecks =
{
out = {
disallowedReferences = [
"dev"
"doc"
"man"
];
disallowedRequisites = [
stdenv'.cc
llvmPackages.llvm.out
] ++ (map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs));
};

lib = {
disallowedReferences = [
"out"
"dev"
"doc"
"man"
];
disallowedRequisites = [
stdenv'.cc
llvmPackages.llvm.out
] ++ (map lib.getDev (builtins.filter (drv: drv ? "dev") finalAttrs.buildInputs));
};
}
// lib.optionalAttrs (atLeast "14" && olderThan "15") {
# TODO: Make this unconditional via staging because of number of rebuilds.
doc = {
disallowedReferences = [
"out"
"dev"
"man"
];
};

man = {
disallowedReferences = [
"out"
"dev"
"doc"
];
};
};

strictDeps = true;

Expand Down

0 comments on commit a0919c7

Please sign in to comment.