From a8ca1f9583d6af07ce182cd2cf038fff76f848ee Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 6 Mar 2022 19:22:41 +0000 Subject: shells/rust: move tools to nativeBuildInputs This is important for when pkgs is a cross package set. --- shells/rust.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'shells') diff --git a/shells/rust.nix b/shells/rust.nix index 74eafd4f3aaa..8bc6538bc4e1 100644 --- a/shells/rust.nix +++ b/shells/rust.nix @@ -1,17 +1,20 @@ -{ pkgs ? import ../. {} }: -with pkgs; +{ pkgs ? import ../. {} }: pkgs.callPackage ( +{ stdenv, cargo, cargo-deny, cargo-edit, clang, clippy, llvmPackages, pkg-config +, rust-analyzer, rustPlatform, rustc, rustfmt, +}: stdenv.mkDerivation { name = "rust-shell"; - buildInputs = [ - cargo cargo-deny cargo-edit clang clippy llvm pkg-config rust-analyzer rustc - rustfmt + nativeBuildInputs = [ + cargo cargo-deny cargo-edit clang clippy llvmPackages.llvm pkg-config + rust-analyzer rustPlatform.cargoBuildHook rustc rustfmt ]; buildCommand = '' - printf "%s\n" $buildInputs > $out + env > $out ''; # For bindgen LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; } +) { } -- cgit 1.4.1