Skip to content

postgresql.withPackages: add dev output#422969

Merged
K900 merged 1 commit intoNixOS:staging-nextfrom
wolfgangwalther:postgresql-with-packages-closure-size
Jul 6, 2025
Merged

postgresql.withPackages: add dev output#422969
K900 merged 1 commit intoNixOS:staging-nextfrom
wolfgangwalther:postgresql-with-packages-closure-size

Conversation

@wolfgangwalther
Copy link
Contributor

This avoids leaking the dev output and all its dependencies into regular postgresql.withPackages builds, most notably postgresql_jit.

Fixes #419486 (comment), thanks for the report @K900.

Things done


Add a 👍 reaction to pull requests you find important.

This avoids leaking the dev output and all its dependencies into regular
postgresql.withPackages builds, most notably postgresql_jit.
@wolfgangwalther wolfgangwalther requested a review from Ma27 July 6, 2025 16:17
@nix-owners nix-owners bot requested a review from thoughtpolice July 6, 2025 16:19
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Jul 6, 2025
};
}).overrideAttrs
{
# buildEnv doesn't support passing `outputs`, so going via overrideAttrs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of this, but OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, neither am I. Not sure whether support for this should be added to buildEnv, though. Seems like quite a special case.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I haven't tested yet, but are there ways this could mess up splicing?

Like, the fix is good enouh and I done pretty much the same, but I do wonder if it'd be OK to just accept outputs in buildEnv. Like, in the end it's another derivation (that can be modified with overrideAttrs -- as done right now), so I'd argue this is OK even though it's technically a larger API surface 🤔

Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably defer answering this question till after buildEnv has structuredAttrs support. That's because I wanted to add outputChecks as well to prevent regressions, but those only work with structuredAttrs. And enabling them.. broke the whole buildEnv. So I intend to, eventually, first fix structuredAttrs, then look output+checks support at once.

@K900 K900 merged commit 761a9a8 into NixOS:staging-next Jul 6, 2025
25 of 29 checks passed
@wolfgangwalther wolfgangwalther deleted the postgresql-with-packages-closure-size branch July 6, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants