From a0919c7eeda731b1f8e2948d9feebb4ad9b89aab Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 25 Dec 2024 11:21:20 +0100 Subject: [PATCH] postgresql_14: fix build 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. --- pkgs/servers/sql/postgresql/generic.nix | 68 ++++++++++++++++--------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 10cf487ad4a31..2effd687e8e48 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -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;