Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions pkgs/by-name/sk/sketchybar/package.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
{
lib,
overrideSDK,
stdenv,
darwin,
fetchFromGitHub,
testers,
nix-update-script,
apple-sdk_15,
versionCheckHook,
}:

let
inherit (stdenv.hostPlatform) system;
inherit (darwin.apple_sdk_11_0.frameworks)
AppKit
Carbon
CoreAudio
CoreWLAN
CoreVideo
DisplayServices
IOKit
MediaRemote
SkyLight
;

target =
{
"aarch64-darwin" = "arm64";
"x86_64-darwin" = "x86";
}
.${system} or (throw "Unsupported system: ${system}");

stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "sketchybar";
version = "2.21.0";

Expand All @@ -43,15 +29,7 @@ stdenv'.mkDerivation (finalAttrs: {
};

buildInputs = [
AppKit
Carbon
CoreAudio
CoreWLAN
CoreVideo
DisplayServices
IOKit
MediaRemote
SkyLight
apple-sdk_15
];

makeFlags = [ target ];
Expand All @@ -65,14 +43,11 @@ stdenv'.mkDerivation (finalAttrs: {
runHook postInstall
'';

passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "sketchybar-v${finalAttrs.version}";
};
passthru.updateScript = nix-update-script { };

updateScript = nix-update-script { };
};
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;

meta = {
description = "Highly customizable macOS status bar replacement";
Expand Down