flake devShell exports prisma-engines 7.x — breaks prisma migrate/validate in the dev shell #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
nix developdevShell exports thePRISMA_*engine paths from the barepkgs.prisma-engines, which on current nixpkgs resolves to 7.x — and 7.x no longer shipslibquery_engine.node. So runningprisma(validate / migrate / generate via the CLI) inside the devShell fails, even though the nix build works (becausepackage.nixcorrectly pinsprisma-engines_6).Symptom
(Prisma falls back to downloading engines because the env points at a 7.x store path with no
libquery_engine.node.)Root cause
flake.nix(devShell, ~lines 46–51) exports:But
pkgs.prisma-enginesis now aliased to 7.x in nixpkgs.flake.nixalready computes the right attr a few lines up:…and
package.nixusesprisma-engines_6correctly (6.19.3, matching the@prisma/client@^6.19.0inpackage.json). The devShell exports just reference the wrong attr.Fix
Point the devShell
PRISMA_*exports atprisma-engines_6(the same attrpackage.nixuses), e.g.:Workaround (used while developing #27)
Build
prisma-engines_6explicitly and export the paths by hand:Notes
prisma migrate diff/validateduring #27.introspection-engine/PRISMA_INTROSPECTION_ENGINE_BINARYexport is also stale (prisma 6 folded it into schema-engine) — clean up while in there.Closing as invalid — my misdiagnosis. Verified against the flake's actual pinned nixpkgs, not the system channel.
The flake pins nixos-25.05 (
flake.nix:4), where the bareprisma-enginesattr is 6.7.0 — which does shiplibquery_engine.node(the in-flake comment atflake.nix:18-22already says this). Confirmed by running inside the devShell:So the devShell prisma works out of the box, and the #29 integration tests pass in
nix developwith no manual engine env. The 7.x / missing-libquery_engine.nodeI hit during #27 was from runningnix-build '<nixpkgs>'/ barenpx prismaagainst my system channel (unstable, 7.8.0) — never the flake's devShell. Sorry for the noise.One genuine (trivial, non-blocking) nit remains:
flake.nix:50still exportsPRISMA_INTROSPECTION_ENGINE_BINARYto a binary prisma 6 no longer ships. Harmless (only consulted byprisma db pull), so not worth its own issue — will sweep it if I'm in the flake for another reason.