Skip to content

Commit

Permalink
build(nix): fix darwin-to-darwin builds
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
  • Loading branch information
rvolosatovs committed Oct 17, 2023
1 parent a45a512 commit 1253aa1
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 1253aa1

Please sign in to comment.