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

yabai: 3.3.4 -> 3.3.6 #108861

Closed
wants to merge 1 commit into from
Closed

yabai: 3.3.4 -> 3.3.6 #108861

wants to merge 1 commit into from

Conversation

rubas
Copy link

@rubas rubas commented Jan 9, 2021

Motivation for this change

New release, needed for MacOS 11.1.

@cmacrae

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@cmacrae
Copy link
Contributor

cmacrae commented Jan 9, 2021

@rubas did you actually test this? It doesn't compile on Big Sur. This package needs to be updated to utilise darwin-stubs, otherwise the private frameworks it relies on aren't present, which it needs to build

You can try builds of the package with: nix-build -A yabai

@rubas
Copy link
Author

rubas commented Jan 9, 2021

@cmacrae
Thank you! You re correct. It's no building. I had it installed earlier via brew without any issues.

First time I hear about darwin-stubs ... sadly I'm of no help.

Is @koekeishiya already aware of this?

clang src/manifest.m src/osax/sa_loader.c src/osax/sa_payload.c src/osax/sa_mach_bootstrap.c -std=c99 -Wall -g -O0 -fvisibility=hidden -mmacosx-version-min=10.13 -F/System/Library/PrivateFrameworks -framework Carbon -framework Cocoa -framework CoreServices -framework SkyLight -framework ScriptingBridge -o bin/yabai
ld: framework not found SkyLight
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [makefile:59: bin/yabai] Error 1

@rubas rubas marked this pull request as draft January 9, 2021 16:47
@cmacrae
Copy link
Contributor

cmacrae commented Jan 9, 2021

@rubas No worries. Make sure you're testing builds (as indicated in your checked items in the PR description) before submitting a PR :)

This doesn't concern @koekeishiya. This is a package maintained outside of his purview.
Using an Xcode toolchain (as in Homebrew, for instance), yabai builds fine on Big Sur.

This is a nuance imposed by nixpkgs. I plan on updating the package to use darwin-stubs at some point, I just don't have the time at the moment

@rubas
Copy link
Author

rubas commented Jan 9, 2021

No worries. Make sure you're testing builds (as indicated in your checked items in the PR description) before submitting a PR :)

🙄 🙈

I plan on updating the package to use darwin-stubs at some point, I just don't have the time at the moment

I do not know how complicated this is ... but I'm happy to offer a coffee, if I don't have to move back to brew.

@rubas rubas closed this Jan 9, 2021
@cmacrae
Copy link
Contributor

cmacrae commented Jan 9, 2021

Haha, it's all good! At least you know now 👍
That's very kind of you, but not to worry, I'm a heavy user of yabai and only manage my systems with Nix. So, rest assured I'll get around to it soon :)

In the time being, you can use an overlay that simply grabs the latest binary from the yabai releases:

self: super: {
  yabai = super.yabai.overrideAttrs (o: rec {
    version = "3.3.6";
    src = builtins.fetchTarball {
      url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz";
      sha256 = "00iblhdx89wyvasl3hm95w91z4mrwb7pbfdvg9cmpcnqphbfs5ld";
    };

    installPhase = ''
      mkdir -p $out/bin
      mkdir -p $out/share/man/man1/
      cp ./archive/bin/yabai $out/bin/yabai
      cp ./archive/doc/yabai.1 $out/share/man/man1/yabai.1
    '';
  });
}

@aergonaut
Copy link

For anyone finding this issue and wanting to install the latest Yabai (3.3.8 as of this comment) from the GitHub binaries, I had to change the overlay @cmacrae posted to the following:

self: super: {
  yabai = super.yabai.overrideAttrs (
    o: rec {
      version = "3.3.8";
      src = builtins.fetchTarball {
        url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz";
        sha256 = "1qh1vf52j0b3lyrm005c8c98s39rk1lq61rrq0ml2yr4h77rq3xv";
      };

      installPhase = ''
        mkdir -p $out/bin
        mkdir -p $out/share/man/man1/
        cp ./bin/yabai $out/bin/yabai
        cp ./doc/yabai.1 $out/share/man/man1/yabai.1
      '';
    }
  );
}

My Nix version

$ nix --version
nix (Nix) 2.4pre20210326_dd77f71

Apparently no longer unpacks tarballs into an archive directory, but just puts the contents directly in the working directory.

@cmacrae
Copy link
Contributor

cmacrae commented May 4, 2021

Nice, thanks for sharing @aergonaut 👍
As a general update, for anyone who's wondering what's going on with the upkeep of the yabai package: it uses symbols which aren't available in nixpkgs at the moment, due to the outdated Apple SDK.

There's a tracking issue for this amongst other things related to macOS.
Some pretty major refactoring has been done in prep for newer SDK support, but there's still a lot of work left. So, until that's done, I'm afraid this package will remain at this point.

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

Successfully merging this pull request may close these issues.

None yet

4 participants