nixpkgs/pkgs/by-name/sk/sketchybar/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

89 lines
1.6 KiB
Nix
Raw Normal View History

{
lib,
overrideSDK,
stdenv,
darwin,
fetchFromGitHub,
testers,
nix-update-script,
2023-07-31 07:43:40 +00:00
}:
2022-02-09 07:34:19 +00:00
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.isDarwin then overrideSDK stdenv "11.0" else stdenv;
2022-02-09 07:34:19 +00:00
in
stdenv'.mkDerivation (finalAttrs: {
2022-02-09 07:34:19 +00:00
pname = "sketchybar";
2024-03-14 12:51:29 +00:00
version = "2.21.0";
2022-02-09 07:34:19 +00:00
src = fetchFromGitHub {
owner = "FelixKratz";
repo = "SketchyBar";
2023-07-31 07:43:40 +00:00
rev = "v${finalAttrs.version}";
2024-03-14 12:51:29 +00:00
hash = "sha256-hTfQQjx6ai83zYFfccsz/KaoZUIj5Dfz4ENe59gS02E=";
2022-02-09 07:34:19 +00:00
};
2023-07-31 07:43:40 +00:00
buildInputs = [
2023-08-25 13:11:10 +00:00
AppKit
2023-10-28 14:21:13 +00:00
Carbon
2023-08-25 13:11:10 +00:00
CoreAudio
2023-07-31 07:43:40 +00:00
CoreWLAN
2023-08-25 13:11:10 +00:00
CoreVideo
2023-07-31 07:43:40 +00:00
DisplayServices
2023-08-25 13:11:10 +00:00
IOKit
2023-07-31 07:43:40 +00:00
MediaRemote
SkyLight
];
2022-02-09 07:34:19 +00:00
makeFlags = [ target ];
2022-02-09 07:34:19 +00:00
installPhase = ''
2023-07-31 07:43:40 +00:00
runHook preInstall
2022-02-09 07:34:19 +00:00
mkdir -p $out/bin
2022-05-16 16:10:54 +00:00
cp ./bin/sketchybar $out/bin/sketchybar
2023-07-31 07:43:40 +00:00
runHook postInstall
2022-02-09 07:34:19 +00:00
'';
2024-03-27 02:06:55 +00:00
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "sketchybar-v${finalAttrs.version}";
};
updateScript = nix-update-script { };
2023-09-18 19:58:14 +00:00
};
2023-07-31 07:43:40 +00:00
meta = {
2022-02-09 07:34:19 +00:00
description = "Highly customizable macOS status bar replacement";
homepage = "https://github.com/FelixKratz/SketchyBar";
2023-07-31 07:43:40 +00:00
license = lib.licenses.gpl3;
2023-08-26 00:40:49 +00:00
mainProgram = "sketchybar";
maintainers = with lib.maintainers; [
azuwis
khaneliman
];
2023-07-31 07:43:40 +00:00
platforms = lib.platforms.darwin;
2022-02-09 07:34:19 +00:00
};
2023-07-31 07:43:40 +00:00
})