From 0f44451919974d72a5e75f9672a4928f9d84f99e Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 16 Oct 2023 16:14:11 +0100 Subject: fix(tvix): fix binary building on Darwin On Darwin, some crates producing binaries need to be able to link against security. Change-Id: I5bdd69247c12729b9efd5c4f18527d361ef99e87 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9758 Reviewed-by: Connor Brewster Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tvix/default.nix') diff --git a/tvix/default.nix b/tvix/default.nix index 3be2b15e6523..b164bb22a22f 100644 --- a/tvix/default.nix +++ b/tvix/default.nix @@ -6,6 +6,9 @@ let protobufDep = prev: (prev.nativeBuildInputs or [ ]) ++ [ pkgs.protobuf ]; iconvDarwinDep = lib.optional pkgs.stdenv.isDarwin pkgs.libiconv; + # On Darwin, some crates producing binaries need to be able to link against security. + securityDarwinDep = lib.optional pkgs.stdenv.isDarwin pkgs.buildPackages.darwin.apple_sdk.frameworks.Security; + # Load the crate2nix crate tree. crates = import ./Cargo.nix { inherit pkgs; @@ -42,11 +45,16 @@ let nativeBuildInputs = protobufDep prev; }; + tvix-cli = prev: { + buildInputs = prev.buildInputs or [ ] ++ securityDarwinDep; + }; + tvix-store = prev: { PROTO_ROOT = depot.tvix.proto; nativeBuildInputs = protobufDep prev; # fuse-backend-rs uses DiskArbitration framework to handle mount/unmount on Darwin buildInputs = prev.buildInputs or [ ] + ++ securityDarwinDep ++ lib.optional pkgs.stdenv.isDarwin pkgs.buildPackages.darwin.apple_sdk.frameworks.DiskArbitration; }; }; -- cgit 1.4.1