-
Notifications
You must be signed in to change notification settings - Fork 325
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
Fix nix build on OSX #1340
Fix nix build on OSX #1340
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to my noob eyes.
Adding @lucendio as I heard you tried OSX Nix things before. |
@@ -14,7 +14,13 @@ self: super: { | |||
sha256 = "1i9dlhw0xk1viglyhail9fb36v1awrypps8jmhrkz8k1bhx98ci3"; | |||
}; | |||
cargoSha256 = "0zs8ibv7rinrrzp9naxd7yak7kn1gp3pjb3g8i4wf7xw2hkkq81z"; | |||
|
|||
patchLibs = super.lib.optionalString super.stdenv.isDarwin '' | |||
install_name_tool -id $out/lib/libcryptobox.dylib $out/lib/libcryptobox.dylib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this was absolutely needed? I thought it fixed itself by just bumping nixpkgs
no?
The fact that buildRustPackage
outputs binaries with broken paths sounds like something we should report as a bug upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was PBUK. Paths looked ok.... but not when I scrolled up. And it didn't build until I made that change.
It's a known issue apparently https://discourse.nixos.org/t/patchelf-for-mach-o-shared-libraries/562/6 there's even a hook for it fixDarwinDylibNames
.
due to my lack of experience with nix and Haskell on macos (and in general), I'm not equipped to review and give feedback. |
All good @lucendio thanks! |
cryptobox and zauth wouldn't build on OSX because the wrong path was included in the
dylib
.The symptom was that the
cryptobox-c
haskell library build would fail with:The fix proposed in this post fixed the problem.