-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Nix support on mac (requires testing) #1409
Conversation
- mac support requires testing! - use lib.cleanSource to stop unnecessary nix builds - rename `fastnp` to fastn
@siddhantk232 I am getting the following:
|
I tried adding: buildInput = with pkgs; lib.optionals stdenv.isDarwin [ darwin.Security darwin.apple_sdk.frameworks.Security ]; As recommended here: https://discourse.nixos.org/t/compile-a-rust-binary-on-macos-dbcrossbar/8612/2, but still same error. |
Could you try adding this to |
If that didn't work, then: buildInputs = with pkgs; lib.optionals stdenv.isDarwin [
darwin.Security darwin.apple_sdk.frameworks.Security
darwin.Security darwin.apple_sdk.frameworks.CoreFoundation
darwin.Security darwin.apple_sdk.frameworks.CoreServices
darwin.Security darwin.apple_sdk.frameworks.SystemConfiguration
]; ps: I have no idea what I'm suggesting here 😑 |
I think I've made a typo in |
Tried this, same problem :-( buildInputs = with pkgs; lib.optionals stdenv.isDarwin [ darwin.Security ]; |
This worked! nix run . -- --version
warning: Git tree '/Users/amitu/Projects/fastn' is dirty
fastn: FTD Package Manager 0.3.76 diff --git a/flake.nix b/flake.nix
index 0d28434bf..4cde95118 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,7 +39,12 @@
openssl.dev
] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
- buildInput = with pkgs; lib.optionals stdenv.isDarwin [ darwin.Security ];
+ buildInputs = with pkgs; lib.optionals stdenv.isDarwin [
+ darwin.Security darwin.apple_sdk.frameworks.Security
+ darwin.Security darwin.apple_sdk.frameworks.CoreFoundation
+ darwin.Security darwin.apple_sdk.frameworks.CoreServices
+ darwin.Security darwin.apple_sdk.frameworks.SystemConfiguration
+ ];
};
in
rec { |
This works too: diff --git a/flake.nix b/flake.nix
index 0d28434bf..ad44b8ebd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -39,7 +39,9 @@
openssl.dev
] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
- buildInput = with pkgs; lib.optionals stdenv.isDarwin [ darwin.Security ];
+ buildInputs = with pkgs; lib.optionals stdenv.isDarwin [
+ darwin.apple_sdk.frameworks.SystemConfiguration
+ ];
};
in
rec { |
This PR adds
darwin.Security
andxcbuild
which should fix #1401.Tested on linux (NixOS) with:
nix build .
Required testing on a mac, run
nix build .
ornix run .
with this branch checked out before merging this PR.Upon failure, please include the full log. Nix will mention the command to get the full log at the end of the error message.
Some QOL changes have also been made: