From c40708f924d3548b435416c5cee760ef96bc9fb8 Mon Sep 17 00:00:00 2001 From: luxus Date: Sat, 3 Dec 2022 00:52:26 +0100 Subject: [PATCH 1/2] darwin.apple_sdk.frameworks.DisplayServices: init Used by sketchybar --- pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix | 1 + .../os-specific/darwin/apple-sdk-11.0/private-frameworks.nix | 5 ++++- pkgs/os-specific/darwin/apple-sdk/default.nix | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix index b7666fe31cdb..d7ac5d9fd904 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/apple_sdk.nix @@ -174,6 +174,7 @@ in rec { ) // ( lib.mapAttrs privateFramework (import ./private-frameworks.nix { inherit frameworks; + libobjc = pkgs.darwin.apple_sdk_11_0.objc4; }) ); diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix index 84ca7c42301b..27749dde100a 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix @@ -1,4 +1,4 @@ -{ frameworks }: with frameworks; +{ frameworks, libobjc }: with frameworks; # generated by hand to avoid exposing all private frameworks # frameworks here are only the necessary ones used by public frameworks. { @@ -22,6 +22,9 @@ # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. DebugSymbols = {}; + # Also expose DisplayServices; used by `sketchybar` package. + DisplayServices = { inherit libobjc; }; + # Also expose MultitouchSupport; used by `chuck` package. MultitouchSupport = {}; } diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 7cc9e293f725..5cf37e8f4026 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -330,6 +330,7 @@ in rec { "ContactsPersistence" "CoreSymbolication" "DebugSymbols" + "DisplayServices" "GameCenter" "MultitouchSupport" "SkyLight" From b31bb0e1d144d5a15644f7f919f01b95ce3d7d1e Mon Sep 17 00:00:00 2001 From: luxus Date: Thu, 1 Dec 2022 14:53:45 +0100 Subject: [PATCH 2/2] sketchybar: 2.8.2 -> 2.13.2 --- pkgs/os-specific/darwin/sketchybar/default.nix | 9 ++++----- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/sketchybar/default.nix b/pkgs/os-specific/darwin/sketchybar/default.nix index 4f089c7be3e1..57feb54614a0 100644 --- a/pkgs/os-specific/darwin/sketchybar/default.nix +++ b/pkgs/os-specific/darwin/sketchybar/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, memstreamHook, Carbon, Cocoa, SkyLight }: +{ lib, stdenv, fetchFromGitHub, Carbon, Cocoa, DisplayServices, SkyLight }: let inherit (stdenv.hostPlatform) system; @@ -10,17 +10,16 @@ in stdenv.mkDerivation rec { pname = "sketchybar"; - version = "2.8.2"; + version = "2.13.2"; src = fetchFromGitHub { owner = "FelixKratz"; repo = "SketchyBar"; rev = "v${version}"; - sha256 = "sha256-GmM+0h6xxUzW2kpTDZWAiqJAXoQgdsJRlNbvsuxKmZ8="; + sha256 = "sha256-EPpD1QuJXFFwWcs1gmhjf9zm6mkEM72Zr8NOAAgxI4I="; }; - buildInputs = [ Carbon Cocoa SkyLight ] - ++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ]; + buildInputs = [ Carbon Cocoa DisplayServices SkyLight ]; makeFlags = [ target diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f9a2e89c5d1..834318e5568e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11700,8 +11700,8 @@ with pkgs; sixpair = callPackage ../tools/misc/sixpair {}; - sketchybar = callPackage ../os-specific/darwin/sketchybar { - inherit (darwin.apple_sdk.frameworks) Carbon Cocoa SkyLight; + sketchybar = darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/sketchybar { + inherit (darwin.apple_sdk_11_0.frameworks) Carbon Cocoa DisplayServices SkyLight; }; skippy-xd = callPackage ../tools/X11/skippy-xd {};