about summary refs log tree commit diff
path: root/tvix/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-10-16T15·14+0100
committerflokli <flokli@flokli.de>2023-10-16T15·14+0000
commit0f44451919974d72a5e75f9672a4928f9d84f99e (patch)
tree5af75657ca5e567603dc4a3b0e63766966411f8b /tvix/default.nix
parent5ce1a03a3a3a4861cfb451b29286607e0b7ccb20 (diff)
fix(tvix): fix binary building on Darwin r/6838
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 <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/default.nix')
-rw-r--r--tvix/default.nix8
1 files changed, 8 insertions, 0 deletions
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;
       };
     };