From 4089e292e56c928b9cc6a2700567f9ecf89f3b80 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 15 Jul 2024 21:35:19 -0700 Subject: [PATCH] convert-to-import-cargo-lock: avoid top-level with in shell.nix --- .../convert-to-import-cargo-lock/shell.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix b/maintainers/scripts/convert-to-import-cargo-lock/shell.nix index 8e913fdcd8be5..fc2e2348309d7 100644 --- a/maintainers/scripts/convert-to-import-cargo-lock/shell.nix +++ b/maintainers/scripts/convert-to-import-cargo-lock/shell.nix @@ -1,5 +1,17 @@ -with import ../../../. { }; - +{ + pkgs ? import ../../.. { }, +}: +let + inherit (pkgs) lib stdenv mkShell; +in mkShell { - packages = [ rustc cargo clippy rustfmt ] ++ lib.optional stdenv.isDarwin libiconv; + packages = + with pkgs; + [ + rustc + cargo + clippy + rustfmt + ] + ++ lib.optional stdenv.isDarwin pkgs.libiconv; }