diff options
author | Austin Horstman <khaneliman12@gmail.com> | 2024-04-14 16:44:58 -0500 |
---|---|---|
committer | Austin Horstman <khaneliman12@gmail.com> | 2024-04-23 19:02:33 -0500 |
commit | 01c6349c14b20bb7b71841bb6b060f37de5c1336 (patch) | |
tree | 831bf348819bba03075cf2fb76540d386b9aaef1 /pkgs/by-name | |
parent | c581fbc92c8d7a748d2e3028c2fc96a616c16bdb (diff) |
sketchybar: pkgs/os-specific -> pkgs/by-name
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/sk/sketchybar/package.nix | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/pkgs/by-name/sk/sketchybar/package.nix b/pkgs/by-name/sk/sketchybar/package.nix new file mode 100644 index 0000000000000..37a9849b2830c --- /dev/null +++ b/pkgs/by-name/sk/sketchybar/package.nix @@ -0,0 +1,88 @@ +{ + lib, + overrideSDK, + stdenv, + darwin, + fetchFromGitHub, + testers, + nix-update-script, +}: + +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; +in +stdenv'.mkDerivation (finalAttrs: { + pname = "sketchybar"; + version = "2.21.0"; + + src = fetchFromGitHub { + owner = "FelixKratz"; + repo = "SketchyBar"; + rev = "v${finalAttrs.version}"; + hash = "sha256-hTfQQjx6ai83zYFfccsz/KaoZUIj5Dfz4ENe59gS02E="; + }; + + buildInputs = [ + AppKit + Carbon + 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}"; + }; + + updateScript = nix-update-script { }; + }; + + 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; + }; +}) |