From fbf1525f0186aaaf7f7c84eee3ec35b9573e80f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 18 May 2021 16:35:37 +0200 Subject: [PATCH] probe-run: fix darwin build (#123494) --- pkgs/development/tools/rust/probe-run/default.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/probe-run/default.nix b/pkgs/development/tools/rust/probe-run/default.nix index 7371e4bb9ba..262d8c4945e 100644 --- a/pkgs/development/tools/rust/probe-run/default.nix +++ b/pkgs/development/tools/rust/probe-run/default.nix @@ -1,4 +1,5 @@ -{ lib, rustPlatform, fetchFromGitHub, pkg-config, libusb1 }: +{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, libusb1 +, libiconv, AppKit, IOKit }: rustPlatform.buildRustPackage rec { pname = "probe-run"; @@ -14,7 +15,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "HmDKfb8F6sGnaX64FR3No2GbBYm4bVopbjs8d35WiZQ="; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libusb1 ]; + buildInputs = [ libusb1 ] + ++ lib.optionals stdenv.isDarwin [ libiconv AppKit IOKit ]; meta = with lib; { description = "Run embedded programs just like native ones."; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 558da9787c3..06664e9216c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -265,7 +265,9 @@ in html5validator = python3Packages.callPackage ../applications/misc/html5validator { }; - probe-run = callPackage ../development/tools/rust/probe-run {}; + probe-run = callPackage ../development/tools/rust/probe-run { + inherit (darwin.apple_sdk.frameworks) AppKit IOKit; + }; proto-contrib = callPackage ../development/tools/proto-contrib {};