From 5a45ed1f2b163d8ea07a778c7b517aa5f379c649 Mon Sep 17 00:00:00 2001 From: Lloyd Date: Mon, 1 Sep 2025 23:08:49 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=99=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/flake.nix | 25 +++++++++++++++++-------- backend/src/main.rs | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/backend/flake.nix b/backend/flake.nix index a2eef6b..998a32d 100644 --- a/backend/flake.nix +++ b/backend/flake.nix @@ -23,13 +23,22 @@ nativeBuildInputs = nativeBuildInputs; }; - # devShells.${system}.default = pkgs.mkShell { - # packages = buildInputs; - # inputsFrom = nativeBuildInputs; - # - # shellHook = '' - # exec zsh - # ''; - # }; + devShells.${system}.default = pkgs.mkShell { + inputsFrom = [self.packages.${system}.default]; + + packages = with pkgs; [ + rustc + cargo + rustfmt + rust-analyzer + zsh + ]; + + shellHook = '' + export SHELL=${pkgs.zsh}/bin/zsh + # jump into zsh if we didn't already start in it + [ -z "$ZSH_VERSION" ] && exec ${pkgs.zsh}/bin/zsh -l + ''; + }; }; } diff --git a/backend/src/main.rs b/backend/src/main.rs index ff62f12..f83d196 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -62,7 +62,7 @@ fn main() { } // let rt = Runtime::new().unwrap(); - // let handle = rt.handle().clone(); + let handle = rt.handle().clone(); // let addr = "127.0.0.1:7050"; // // let socket = WsServer::bind(addr, handle);