Skip to content
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 running & building under macOS (Big Sur) #9

Merged

Conversation

antifuchs
Copy link
Contributor

I've been meaning to try deploy-rs, but I run macOS; since it doesn't currently build there (the activate binary has a linux-only inotify dependency, and there was a version incompatibility that prevented building on my OS release), here's a patch that makes it work.

I think this PR ought to retain compatibility with Linux.

What's it do in detail?

  • Bumps nixpkgs to a version that ships rust 1.47, as older binaries don't correctly link on macOS 11.0
  • Special-cases out the activate binary on macOS (and activates singleStep mode there for How do you select --bin targets? nix-community/naersk#127
  • Adds some native build flags necessary to get a working build env on macOS.

Hope this looks reasonable! I'm still evaluating deploy-rs, but it does show --help on macOS with this change, at least (:

* Bump the nixpkgs version to one that ships Rust 1.47, which can
  produce binaries under macOS 11 (Big Sur).

* Use darwin-specific options that let Naersk build the "deploy"
  binary under macOS. (With a work-around for
  nix-community/naersk#127, which prevents this
  from being much more straight-forward).

Unfortunately, the "activate" binary can't be built under macOS due to
the inotify dependency; that means the best we can do is to run the
deploy under macOS, not deploy *to* macOS.
@notgne2
Copy link
Contributor

notgne2 commented Nov 25, 2020

This looks good, in the future I'd maybe like to make the activate binary work on macOS too (either removing magicRollback support or using the equivilent APIs)

@notgne2 notgne2 merged commit 42cbe75 into serokell:master Nov 25, 2020
@antifuchs antifuchs deleted the attempt-to-fix-corefoundation-error branch November 25, 2020 15:17
@antifuchs
Copy link
Contributor Author

I think the notify crate might be a match for this use case - it is cross-platform and might even have a nicer API than inotify does (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants