From 73b604930c3d8459ee49b13b9091e726f5b4d3e7 Mon Sep 17 00:00:00 2001 From: Farhan <249513614+farhankhalaf@users.noreply.github.com> Date: Mon, 26 Oct 2026 18:51:08 -0700 Subject: [PATCH] fix(nix): restore worker-build and lld in the devshell PR #38 added pkgs.worker-build and pkgs.lld so `alchemy deploy` and `alchemy dev` of packages/infra can build crates/cloudflare-worker-example. PR #37 merged 92 seconds later and rewrote the package list, dropping both. On main the devshell has no worker-build, so the RustCloudflareWorkerBuild step fails on a fresh checkout, and nixpkgs rustc cannot link wasm32 without lld. Add both back, gated on the worker crate being present so library template slices without it stay lean. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RdyTmsnUzihkE8KMmq9qHo --- nix/flake/devShells/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/flake/devShells/default.nix b/nix/flake/devShells/default.nix index 3984ba2..69bc5b5 100644 --- a/nix/flake/devShells/default.nix +++ b/nix/flake/devShells/default.nix @@ -5,6 +5,7 @@ hasApps = builtins.pathExists ../../../apps; hasTypeScript = builtins.pathExists ../../../package.json; hasRust = builtins.pathExists ../../../Cargo.toml; + hasRustWorker = builtins.pathExists ../../../crates/cloudflare-worker-example; in { perSystem = { config, @@ -24,6 +25,9 @@ in { [pkgs.git config.treefmt.build.wrapper] ++ lib.optionals hasTypeScript [pkgs.bun pkgs.nodejs_24] ++ lib.optionals hasRust [pkgs.cargo pkgs.rustc pkgs.rustfmt pkgs.clippy pkgs.rust-analyzer] + # Builds crates/cloudflare-worker-example into a Worker bundle. nixpkgs + # rustc ships the wasm32 std; lld links it. + ++ lib.optionals hasRustWorker [pkgs.lld pkgs.worker-build] ++ lib.optionals hasApps [ config.packages.prelude pkgs.age