narsil: bbc8fc5efd779ec885045f9b8d903d0df1bec1b2 -> f5ec6bd6b8013f2a2b74fc45b6f4c5374...
[NixPkgs.git] / pkgs / by-name / sw / swiftbar / package.nix
blobbb7d7ad8ee61a3c3193d3163100c21a7981976f5
2   lib,
3   fetchzip,
4   stdenvNoCC,
5   makeWrapper,
6 }:
7 let
8   build = "520";
9 in
10 stdenvNoCC.mkDerivation rec {
11   pname = "swiftbar";
12   version = "2.0.0";
14   src = fetchzip {
15     url = "https://github.com/swiftbar/SwiftBar/releases/download/v${version}/SwiftBar.v${version}.b${build}.zip";
16     hash = "sha256-eippK01Q+J9jdwvnGcnr7nw3KwyQQqh051lHN3Xmy+c=";
17     stripRoot = false;
18   };
20   dontConfigure = true;
21   dontBuild = true;
23   nativeBuildInputs = [ makeWrapper ];
25   installPhase = ''
26     runHook preInstall
28     mkdir -p $out/{Applications,bin}
29     cp -r ./SwiftBar.app $out/Applications
31     # Symlinking doesnt work; The auto-updater will fail to start which renders the app useless
32     makeWrapper $out/Applications/SwiftBar.app/Contents/MacOS/SwiftBar $out/bin/SwiftBar
34     runHook postInstall
35   '';
37   meta = with lib; {
38     description = "Powerful macOS menu bar customization tool";
39     homepage = "https://swiftbar.app";
40     changelog = "https://github.com/swiftbar/SwiftBar/releases/tag/v${version}";
41     mainProgram = "SwiftBar";
42     license = licenses.mit;
43     platforms = platforms.darwin;
44     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
45     maintainers = with maintainers; [ matteopacini ];
46   };