depot/third_party/nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

41 lines
1,011 B
Nix

{ lib, stdenv, fetchFromGitHub, memstreamHook, Carbon, Cocoa, SkyLight }:
let
inherit (stdenv.hostPlatform) system;
target = {
"aarch64-darwin" = "arm64";
"x86_64-darwin" = "x86";
}.${system} or (throw "Unsupported system: ${system}");
in
stdenv.mkDerivation rec {
pname = "sketchybar";
version = "2.8.2";
src = fetchFromGitHub {
owner = "FelixKratz";
repo = "SketchyBar";
rev = "v${version}";
sha256 = "sha256-GmM+0h6xxUzW2kpTDZWAiqJAXoQgdsJRlNbvsuxKmZ8=";
};
buildInputs = [ Carbon Cocoa SkyLight ]
++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ];
makeFlags = [
target
];
installPhase = ''
mkdir -p $out/bin
cp ./bin/sketchybar $out/bin/sketchybar
'';
meta = with lib; {
description = "A highly customizable macOS status bar replacement";
homepage = "https://github.com/FelixKratz/SketchyBar";
platforms = platforms.darwin;
maintainers = [ maintainers.azuwis ];
license = licenses.gpl3;
};
}