2024-07-01 15:47:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchzip,
|
|
|
|
stdenvNoCC,
|
|
|
|
makeWrapper,
|
2022-09-09 14:08:57 +00:00
|
|
|
}:
|
2024-07-27 06:49:29 +00:00
|
|
|
let
|
|
|
|
build = "520";
|
|
|
|
in
|
2022-09-09 14:08:57 +00:00
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
|
|
pname = "swiftbar";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.0.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2024-07-27 06:49:29 +00:00
|
|
|
url = "https://github.com/swiftbar/SwiftBar/releases/download/v${version}/SwiftBar.v${version}.b${build}.zip";
|
|
|
|
hash = "sha256-eippK01Q+J9jdwvnGcnr7nw3KwyQQqh051lHN3Xmy+c=";
|
2022-09-09 14:08:57 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{Applications,bin}
|
|
|
|
cp -r ./SwiftBar.app $out/Applications
|
|
|
|
|
|
|
|
# Symlinking doesnt work; The auto-updater will fail to start which renders the app useless
|
|
|
|
makeWrapper $out/Applications/SwiftBar.app/Contents/MacOS/SwiftBar $out/bin/SwiftBar
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Powerful macOS menu bar customization tool";
|
|
|
|
homepage = "https://swiftbar.app";
|
|
|
|
changelog = "https://github.com/swiftbar/SwiftBar/releases/tag/v${version}";
|
|
|
|
mainProgram = "SwiftBar";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.darwin;
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2024-07-01 15:47:52 +00:00
|
|
|
maintainers = with maintainers; [ matteopacini ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|