nix: Fix linker error on macos 14.3 with nix build

Using nix build resulted in a linker error

ld: framework not found Security

Following the proposed solution in
https://discourse.nixos.org/t/compile-a-rust-binary-on-macos-dbcrossbar/8612
resolves the issue.
This commit is contained in:
Timm Behner 2024-03-06 09:49:20 +01:00 committed by cloudhead
parent 4b1ca18d0c
commit 00102beb29
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@
++ lib.optionals pkgs.stdenv.isDarwin [ ++ lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here # Additional darwin specific inputs can be set here
pkgs.libiconv pkgs.libiconv
pkgs.darwin.apple_sdk.frameworks.Security
]; ];
preBuild = lib.optionalString (self.shortRev or null != null) '' preBuild = lib.optionalString (self.shortRev or null != null) ''
export GIT_HEAD=${self.shortRev} export GIT_HEAD=${self.shortRev}