From 38c483b92ad660c3430bdc6f0c6a7a81a9e41bb6 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Sun, 22 Feb 2026 08:25:37 +0100 Subject: [PATCH] More explicitly name all the dependencies in shell.nix Add all the relevant tools to compile (only `cargo` needed, `rustc` is bundled with it in the right version) and develop (`clippy` and `rustfmt` can then directly be called from cargo; `rust-analyzer` provides a useful language server for editor). Made it possible to override nixpkgs by providing an overridable `pkgs`. Not sure if the `LD_LIBRARY_PATH` is needed; left it like this for now. Signed-off-by: Henner Zeller --- hostcontrol/shell.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/hostcontrol/shell.nix b/hostcontrol/shell.nix index 31cd001..935429c 100644 --- a/hostcontrol/shell.nix +++ b/hostcontrol/shell.nix @@ -1,7 +1,22 @@ -with import {}; - +{ + pkgs ? import { }, +}: pkgs.mkShell { - LD_LIBRARY_PATH = [ + buildInputs = with pkgs; [ + cargo + + # Useful tools + clippy + rustfmt + rust-analyzer + + # minimal git + git + less + cacert # For cargo downloads and git to verify certs + ]; + LD_LIBRARY_PATH = with pkgs; [ + # TODO: needed ? "${xorg.libX11}/lib;${xorg.libXcursor}/lib;${xorg.libXi}/lib;${libxkbcommon}/lib" ]; } -- 2.50.1