From dd74e01bf546177e535e0c30b542da6e53f88161 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 17 Oct 2023 16:19:49 +0200 Subject: [PATCH] build(nix): fix darwin-to-darwin builds Signed-off-by: Roman Volosatovs --- flake.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 046aa21..99a6ed5 100644 --- a/flake.nix +++ b/flake.nix @@ -189,14 +189,19 @@ doCheck = false; }); }); + + darwin2darwin = pkgs.stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isDarwin; + buildInputs' = + buildInputs + ++ optional darwin2darwin pkgs.libiconv; in - optionalAttrs (craneArgs ? cargoArtifacts) { + { + buildInputs = buildInputs'; + } + // optionalAttrs (craneArgs ? cargoArtifacts) { buildInputs = - buildInputs - ++ optionals (pkgs.stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isDarwin) [ - pkgs.darwin.apple_sdk.frameworks.Security - pkgs.libiconv - ]; + buildInputs' + ++ optional darwin2darwin pkgs.darwin.apple_sdk.frameworks.Security; # only lock deps in non-dep builds preBuild =