nixpkgs/pkgs/os-specific/darwin/sketchybar/default.nix

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

42 lines
1,011 B
Nix
Raw Normal View History

2022-03-09 09:50:24 +01:00
{ lib, stdenv, fetchFromGitHub, memstreamHook, Carbon, Cocoa, SkyLight }:
2022-02-09 08:34:19 +01:00
let
inherit (stdenv.hostPlatform) system;
target = {
2022-05-16 18:10:54 +02:00
"aarch64-darwin" = "arm64";
2022-02-09 08:34:19 +01:00
"x86_64-darwin" = "x86";
}.${system} or (throw "Unsupported system: ${system}");
in
stdenv.mkDerivation rec {
pname = "sketchybar";
2022-05-16 18:10:54 +02:00
version = "2.5.2";
2022-02-09 08:34:19 +01:00
src = fetchFromGitHub {
owner = "FelixKratz";
repo = "SketchyBar";
rev = "v${version}";
2022-05-16 18:10:54 +02:00
sha256 = "sha256-xkgNPVrGxmi8377+G1HQ8SdwS0fOnGhwYy43yLRyvF0=";
2022-02-09 08:34:19 +01:00
};
2022-03-09 09:50:24 +01:00
buildInputs = [ Carbon Cocoa SkyLight ]
++ lib.optionals (stdenv.system == "x86_64-darwin") [ memstreamHook ];
2022-02-09 08:34:19 +01:00
makeFlags = [
target
];
installPhase = ''
mkdir -p $out/bin
2022-05-16 18:10:54 +02:00
cp ./bin/sketchybar $out/bin/sketchybar
2022-02-09 08:34:19 +01:00
'';
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;
};
}