depot/third_party/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

70 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, AppKit
, CoreAudio
, CoreWLAN
, CoreVideo
, DisplayServices
, IOKit
, MediaRemote
, SkyLight
, testers
}:
let
inherit (stdenv.hostPlatform) system;
target = {
"aarch64-darwin" = "arm64";
"x86_64-darwin" = "x86";
}.${system} or (throw "Unsupported system: ${system}");
in
stdenv.mkDerivation (finalAttrs: {
pname = "sketchybar";
version = "2.17.0";
src = fetchFromGitHub {
owner = "FelixKratz";
repo = "SketchyBar";
rev = "v${finalAttrs.version}";
hash = "sha256-FntWC180wpUyxP5iYdo/p2LbP0dbv1y6CXersfBT5b4=";
};
buildInputs = [
AppKit
CoreAudio
CoreWLAN
CoreVideo
DisplayServices
IOKit
MediaRemote
SkyLight
];
makeFlags = [
target
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ./bin/sketchybar $out/bin/sketchybar
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "sketchybar-v${finalAttrs.version}";
};
meta = {
description = "A highly customizable macOS status bar replacement";
homepage = "https://github.com/FelixKratz/SketchyBar";
license = lib.licenses.gpl3;
mainProgram = "sketchybar";
maintainers = with lib.maintainers; [ azuwis khaneliman ];
platforms = lib.platforms.darwin;
};
})