From 1f21fc5e47c2bf7d9cf09cc781c76381d017894c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Sat, 3 Nov 2018 08:47:18 +0100 Subject: [PATCH] cargo-asm: fix build on macOS Mojave Building cargo-asm on Mojave fails with ld: framework not found Security Add Security as a build input. --- pkgs/development/tools/rust/cargo-asm/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-asm/default.nix b/pkgs/development/tools/rust/cargo-asm/default.nix index ca793bf49080..246f5b18843c 100644 --- a/pkgs/development/tools/rust/cargo-asm/default.nix +++ b/pkgs/development/tools/rust/cargo-asm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform }: +{ stdenv, fetchFromGitHub, rustPlatform, Security }: rustPlatform.buildRustPackage rec { name = "cargo-asm-${version}"; @@ -13,6 +13,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1m2j6i8hc8isdlj77gv9m6sk6q0x3bvzpva2k16g27i1ngy1989b"; + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + # Test checks against machine code output, which fails with some # LLVM/compiler versions. doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 62cef2d50689..9917acbbf10e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7357,7 +7357,9 @@ with pkgs; cargo-tree = callPackage ../tools/package-management/cargo-tree { }; cargo-update = callPackage ../tools/package-management/cargo-update { }; - cargo-asm = callPackage ../development/tools/rust/cargo-asm { }; + cargo-asm = callPackage ../development/tools/rust/cargo-asm { + inherit (darwin.apple_sdk.frameworks) Security; + }; cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { }; pyo3-pack = callPackage ../development/tools/rust/pyo3-pack { };