Closed ryuheechul closed 1 year ago
is it designed to run only on linux?
It should work on most (all ?) Unixes, but because I only use Linux, and have never really tested building for other targets, it got broken.
if not what can help this build issue on darwin?
I have made some fixes to build for the x86_64-apple-darwin
target in the macos branch. If you can build that code, and run it to check everything works fine that would help.
If you can and have time to contribute code to update the Github actions, so that we build for Mac at each commit and can detect such breakages in the future, that would be even better.
Hi @desbma, thanks for fixing that I just tested with the code below and it worked :)
# based on the example code from the link below
# https://github.com/NixOS/nixpkgs/blob/645bc49f34fa8eff95479f0345ff57e55b53437e/pkgs/tools/misc/hexyl/default.nix
# more info on rust + nix can be found at
# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
{ pkgs }:
with pkgs; rustPlatform.buildRustPackage rec {
pname = "rsop";
# version = "1.2.2";
version = "macos";
src = fetchFromGitHub {
owner = "desbma";
repo = pname;
rev = "${version}";
sha256 = "sha256-wy3QJqBd+8Kwkjm/IxtsVafESloOvDXF2D1YRVwGkz4=";
};
cargoSha256 = "sha256-hz/cR0WcLngMw4X+c4m7uv45ZrPH4PssR5lTp7W5yYc=";
postInstall = ''
ln -rs "$out"/bin/rs{op,o}
ln -rs "$out"/bin/rs{op,e}
ln -rs "$out"/bin/rs{op,p}
ln -rs "$out"/bin/rs{op,i}
'';
}
I also added the macOS in the CI, you can see the change here, https://github.com/desbma/rsop/compare/macos...ryuheechul:rsop:macos. And the result is here, https://github.com/ryuheechul/rsop/actions/runs/4774434134.
If you like it, I can file a PR with it. If so let me know which branch to target!
Thanks, you can make a PR targeting the macos branch.
I don't think the step to setup NodeJS is needed though.
Sounds good and I just opened the PR. I added NodeJS steps because I saw some warning regarding NodeJS. However after your comment I checked again and still the warning so the change didn't improve anything on that therefore it's deleted :)
master
branch now builds on MacOS
I'm currently trying to see if I can build this on macOS.
At the moment I'm testing this using nix below.
And resulted with errors below (probably raw
cargo
usage instead ofnix
would result in the same error).Looking at https://github.com/desbma/rsop/blob/7ffa5a911b85121ed72b2d10bb7d065b0baa2212/Cargo.toml#L31-L32 gives a hint about requiring nix crate on linux and android seems to do with this build failure on darwin platform.
So I'm wondering about few things:
On a sidenote, I have been managing the branching which previewer binary to print contents when used with
lf
file manager with https://github.com/ryuheechul/dotfiles/blob/master/lf/pv.sh and just discoveredrsop
which looks way cooler than my short bash script so I hoping to give it a try!