From 1d63496e5d1eb4eab5dfa6b462afb227ebfdcb47 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 24 Nov 2018 00:43:52 +0100 Subject: [PATCH] rustfmt: fix build on darwin --- pkgs/development/tools/rust/rustfmt/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/rust/rustfmt/default.nix b/pkgs/development/tools/rust/rustfmt/default.nix index 3fddba5d08e..06a3862adae 100644 --- a/pkgs/development/tools/rust/rustfmt/default.nix +++ b/pkgs/development/tools/rust/rustfmt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform }: +{ stdenv, fetchFromGitHub, rustPlatform, darwin }: rustPlatform.buildRustPackage rec { name = "rustfmt-${version}"; @@ -13,6 +13,9 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1rs6jjm75ixxhrf8b3zn991xa5kfayxlf0b70zdx6wd4r6by7w2y"; + buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + + # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler RUSTC_BOOTSTRAP = 1;