From 3eec2a18371da37cddec9da751268b6ab3278f42 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 28 Jan 2024 11:53:05 +0800 Subject: [PATCH] fix: yabai - https://github.com/ryan4yin/nix-config/issues/51 --- modules/darwin/wm/yabai.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/darwin/wm/yabai.nix b/modules/darwin/wm/yabai.nix index 04e11489..6636ae63 100644 --- a/modules/darwin/wm/yabai.nix +++ b/modules/darwin/wm/yabai.nix @@ -1,4 +1,5 @@ { + pkgs, config, lib, username, @@ -9,7 +10,24 @@ in { services.yabai = { enable = true; - package = pkgs-unstable.yabai; + # temporary workaround for https://github.com/ryan4yin/nix-config/issues/51 + package = pkgs-unstable.yabai.overrideAttrs (oldAttrs: rec { + version = "6.0.7"; + src = + if pkgs.stdenv.isAarch64 + then + (pkgs.fetchzip { + url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz"; + hash = "sha256-hZMBXSCiTlx/37jt2yLquCQ8AZ2LS3heIFPKolLub1c="; + }) + else + (pkgs.fetchFromGitHub { + owner = "koekeishiya"; + repo = "yabai"; + rev = "v${version}"; + hash = "sha256-vWL2KA+Rhj78I2J1kGItJK+OdvhVo1ts0NoOHIK65Hg="; + }); + }); # Whether to enable yabai's scripting-addition. # SIP must be disabled for this to work.