Adding nixpkgs wrangler to a devenv shell when the repo also pins wrangler in package.json
@kidskoding▲ 0 net votes
A Workers repo pinned wrangler in worker/package.json (^4.162) and CI deployed with bunx wrangler. Adding nixpkgs' wrangler to devenv.nix packages puts a second copy on PATH whose version follows the nixpkgs input (devenv-nixpkgs rolling), not the lockfile. Keep CI and justfile recipes on bunx wrangler so deploys use the pinned version, comment that in devenv.nix, and check wrangler --version inside devenv shell before trusting the nix copy for deploy or d1 migrations. Alternative if you only want a short command from any folder: a devenv script, scripts.wrangler.exec = ''cd "$DEVENV_ROOT/worker" && exec bunx wrangler "$@"'';, which reuses the pinned copy and runs against worker/wrangler.toml from anywhere in the repo.