Closed felciano closed 2 years ago
I'd like to do this but I have no idea how to actually make that happen. I don't even own a Mac ;) Is there a way to generate such packages on Linux? Docker maybe or sth? Or maybe homebrew?
If you use Nix, we're working on it here: https://github.com/NixOS/nixpkgs/pull/137626
@cyounkins the ticket you've linked has been merged. Does it mean fclones is already installable on Darwin? Should I close it?
fclones is able to be compiled on Darwin / macOS and basic functionality works, but I haven't extensively tested it. There is at least one failing test due to device names that could be conditioned to be linux-only.
fclones is installable on Darwin / macOS using the Nix package manager when using the 'unstable' channel. Users would need to install Nix, enable the unstable channel, then do nix-env -iA nixpkgs.fclones
.
I love Nix, but it has a higher initial learning curve and smaller user base than Homebrew. There will probably be a request for Homebrew packaging either here or in the Homebrew project sometime soon. It sounds like you don't use macOS @pkolaczk so I would let the Homebrew folks handle that.
Release 0.20.1 comes with darwin / macOS build: https://github.com/pkolaczk/fclones/releases/tag/v0.20.1
I cross-compiled it from Linux. Please let me know how it works.
Release 0.20.1 comes with darwin / macOS build: https://github.com/pkolaczk/fclones/releases/tag/v0.20.1
I cross-compiled it from Linux. Please let me know how it works.
All works on latest macOS, once I confirmed to run the unsigned binary (there's no way to sign a unix binary AFAIK).
A better alternative would be to create a Homebrew formulae, which is surprisingly easy and I've created one below via similar steps to these:
# run on a mac :)
# install homebrew
# to create the formulae:
brew create --rust https://github.com/pkolaczk/fclones/archive/refs/tags/v0.20.1.tar.gz
# to set the homepage:
sed -i '' 's|homepage ""|homepage "https://github.com/pkolaczk/fclones"|' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/fclones.rb
# to clear the comments:
sed -i '' '/^ *#/d' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/fclones.rb
# to fix the test in a silly way:
sed -i '' 's|system "false"|assert_equal "fclones #{version}", shell_output("#{bin}/fclones --version").strip|' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/fclones.rb
# to install the formulae:
brew install --build-from-source fclones
# to test the formulae:
brew test fclones
Then this formulae can be sent as a PR to homebrew-core. Once the formula is accepted in their repo, installing it will be trivial via brew install fclones
and then upgrading with brew upgrade fclones
.
Aside - building a bottle (which is a pre-built binary for a specific OS) for other systems is possible, but I'll have to dig some older macs or even run a linux VM/distro. Let me know.
There's an option to run Homebrew on Linux, which I haven't done since I do not use a linux distro atm.
https://github.com/Homebrew/homebrew-core/pull/100472
Until it is merged, you can use pkolaczk/fclones
tap.
Works on Linux for me.
Yay! They have merged it and now it is officially in homebrew core. Thank you all for the help!
fclones
looks great, but installing a whole Rust build stack to test it out is a bit of barrier. At some point it would be great if MacOS-compatible builds where generated & provided as part of the regular release process.