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,019 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 = {
"aarch64-darwin" = "arm";
"x86_64-darwin" = "x86";
}.${system} or (throw "Unsupported system: ${system}");
in
stdenv.mkDerivation rec {
pname = "sketchybar";
2022-03-09 09:50:24 +01:00
version = "2.5.0";
2022-02-09 08:34:19 +01:00
src = fetchFromGitHub {
owner = "FelixKratz";
repo = "SketchyBar";
rev = "v${version}";
2022-03-09 09:50:24 +01:00
sha256 = "sha256-ucTyJhRhSVyE4E/x6PtFz7nHRUg6cKKVOrRpPs39iO8=";
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
cp ./bin/sketchybar_${target} $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;
};
}