Skip to content

Commit

Permalink
treewide: refactor to use darwin.installBinaryPackage (bartender)
Browse files Browse the repository at this point in the history
  • Loading branch information
afh committed Oct 26, 2024
1 parent d9329f5 commit 6aa67d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
32 changes: 9 additions & 23 deletions pkgs/os-specific/darwin/bartender/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{ lib
, stdenvNoCC
, fetchurl
, _7zz
, darwin
}:

stdenvNoCC.mkDerivation (finalAttrs: {
darwin.installBinaryPackage (finalAttrs: {
pname = "bartender";
version = "5.2.3";

Expand All @@ -14,29 +13,16 @@ stdenvNoCC.mkDerivation (finalAttrs: {
hash = "sha256-G1XL6o5Rk/U5SsT/Q5vWaVSg0qerfzVizjFmudWAI3E=";
};

dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;

nativeBuildInputs = [ _7zz ];

sourceRoot = "Bartender ${lib.versions.major finalAttrs.version}.app";

installPhase = ''
runHook preInstall
mkdir -p "$out/Applications/${finalAttrs.sourceRoot}"
cp -R . "$out/Applications/${finalAttrs.sourceRoot}"
runHook postInstall
'';
appName = "Bartender ${lib.versions.major version}.app";

meta = {
description = "Take control of your menu bar";
longDescription = ''
Bartender is an award-winning app for macOS that superpowers your menu bar, giving you total control over your menu bar items, what's displayed, and when, with menu bar items only showing when you need them.
Bartender improves your workflow with quick reveal, search, custom hotkeys and triggers, and lots more.
Bartender is an award-winning app for macOS that superpowers your menu
bar, giving you total control over your menu bar items, what's displayed,
and when, with menu bar items only showing when you need them.
Bartender improves your workflow with quick reveal, search, custom
hotkeys and triggers, and lots more.
'';
homepage = "https://www.macbartender.com";
changelog = "https://www.macbartender.com/Bartender${lib.versions.major finalAttrs.version}/release_notes/";
Expand All @@ -45,4 +31,4 @@ stdenvNoCC.mkDerivation (finalAttrs: {
maintainers = with lib.maintainers; [ stepbrobd DimitarNestorov ];
platforms = [ "aarch64-darwin" "x86_64-darwin" ];
};
})
}
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25358,8 +25358,6 @@ with pkgs;
ath9k-htc-blobless-firmware-unstable =
callPackage ../os-specific/linux/firmware/ath9k { enableUnstable = true; };

bartender = callPackage ../os-specific/darwin/bartender { };

b43Firmware_5_1_138 = callPackage ../os-specific/linux/firmware/b43-firmware/5.1.138.nix { };

b43Firmware_6_30_163_46 = callPackage ../os-specific/linux/firmware/b43-firmware/6.30.163.46.nix { };
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/darwin-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ impure-cmds // appleSourcePackages // chooseLibs // {
extraBuildInputs = [];
};

bartender = callPackage ../os-specific/darwin/bartender { };

binutils-unwrapped = callPackage ../os-specific/darwin/binutils {
inherit (pkgs) cctools;
inherit (pkgs.llvmPackages) clang-unwrapped llvm llvm-manpages;
Expand Down

0 comments on commit 6aa67d0

Please sign in to comment.