postgresql.withPackages: propagate out from dev output#425384
postgresql.withPackages: propagate out from dev output#425384B4dM4n wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
Hm, when I build (Edit: nvm, that was a different derivation's build log there in my earlier version...) Which doesn't run the fixupPhase, indeed. I can't find any code to verify this claim:
Where does this happen? I think the phases should normally be run, but I can't find where they are disabled. |
|
Ah, the builder for I see it now... that's really annoying. |
Cherry picked commits from 1. NixOS/nixpkgs#425384 2. NixOS/nixpkgs#425382 Signed-off-by: John Titor <[email protected]>
|
|
||
| # populate nix-support/propagated-build-inputs | ||
| eval fixupPhase |
There was a problem hiding this comment.
This is certainly quite hacky. I can't think of anything better, though. Maybe we could create a "proper" derivation, which copies all the symlinks from the buildEnv and then runs all the regular phases. Or we could extend buildEnv to support more things. Outputs, phases, ..
But both of that seems more than we should do to unbreak python3Packages.pgvector now.
There was a problem hiding this comment.
A proper derivation is probably the best solution in the near future.
buildEnv just wasn't build to handle man outputs, dev outputs or now custom phases.
In the future, a generic wrapper would be nice, which combines all outputs from a list packages and produces a "normal" derivation with the same outputs. But how it decides to merge files like nix-support/propagated-build-inputs from multiple packages wouldn't be trivial and probably require manual logic.
For now this is the "cleanest" solution I could find. I thought that I have seen other packages use the same mechanism yesterday, but now I can't find them anymore (except two very weird uses).
There was a problem hiding this comment.
I already see the postgres team taking ownership of pkgs.buildEnv
First of all, how many packages are affected? I'm kinda wondering if we should get something out quickly.
I'm not entirely sure if I think it's reasonable to add support for multiple outputs to buildEnv and on top of that, though "having a multi-output derivation where one output happens to be an env" isn't too unreasonable. OTOH in that case further questions would be "how to do envs in multpiple outputs" or "how to decide which output gets the env" and the idea to just allow multiple outputs seem a little short-sighted, doesn't it?
I'm wondering, perhaps it might be an option to just create a single buildEnv { paths = [ ... ]; } and on top a derivation that takes care of the rest of the magic? I.e. creating a dev output, exposing the withPackages function etc..
Anyways, I'm not entirely sure how to proceed here. I'd rather not merge this hack (unless there's too much stuff we've broke).
WDYT?
There was a problem hiding this comment.
First of all, how many packages are affected? I'm kinda wondering if we should get something out quickly.
The quick fix was already merged in #426048.
Anyways, I'm not entirely sure how to proceed here. I'd rather not merge this hack.
Neither do I, currently working on a replacement in #426704, which I opened literally minutes ago ;)
This will not need any special magic for buildEnv.
JohnRTitor
left a comment
There was a problem hiding this comment.
Can we merge this?
Just noting here: we should probably run a nixpkgs-review before merging to staging-next which is intended for bug fixes, not breaking more things.
open-webui along with several other packages on master are broken ever since the staging-next merge.
|
This is hacky enough that I wouldn't want to merge it without exploring other ideas first. Note that there is a simple quick fix that can be done immediately, if other packages should be unbroken: Temporarily disable the check phase for |
Let's disable the checkPhase to unbreak the package and its dependencies until NixOS#425384 is properly solved.
|
Let's disable the checkPhase to unbreak the package and its dependencies until NixOS#425384 is properly solved.
Currently the combination of
postgresql.withPackagesandpostgresqlTestHookis broken, since the hook can't find thepostgresqlbinaries:This behavior as introduced by #422969, with the addition of a
devoutput. The usedbuildEnvhelper doesn't run the regularpostFixupHook, sonix-support/propagated-build-inputsdoesn't get populated as usual bymultiple-outputs.sh.Fixes #425285
Things done
Built the following packages for
x86_64-linux:❌ 7 packages failed to build:
✅ 5 tests built:
✅ 24 packages built:
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.