From caa2fef17111f0e6d114e6b9b8e68b4a040f8c33 Mon Sep 17 00:00:00 2001 From: julius-boettger Date: Fri, 9 May 2025 22:32:29 +0200 Subject: [PATCH] doc: make flake example follow actual code more closely --- docs/cross_compilation.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/cross_compilation.md b/docs/cross_compilation.md index 580c4ce3..1ff5a475 100644 --- a/docs/cross_compilation.md +++ b/docs/cross_compilation.md @@ -76,9 +76,14 @@ get corresponding compiler toolchains for them. let pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgsCross.aarch64-multiplatform; rust-bin = rust-overlay.lib.mkRustBin { } pkgs.buildPackages; -in pkgs.mkShell { - nativeBuildInputs = [ rust-bin.stable.latest.minimal ]; -} +in +# Need `callPackage` here, see https://github.com/NixOS/nixpkgs/issues/49526 +pkgs.callPackage ( + { mkShell }: + mkShell { + nativeBuildInputs = [ rust-bin.stable.latest.minimal ]; + } +) { } ``` The full example can be seen in