Skip to content

Commit

Permalink
Merge pull request #1329 from emilazy/push-nlxwnqymuupk
Browse files Browse the repository at this point in the history
homebrew: use `mas` from Nixpkgs
  • Loading branch information
emilazy authored Feb 10, 2025
2 parents 0b6f96a + c31b6e8 commit a36049d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules/homebrew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,6 @@ in
description = ''
Applications to install from Mac App Store using {command}`mas`.
When this option is used, `"mas"` is automatically added to
[](#opt-homebrew.brews).
Note that you need to be signed into the Mac App Store for {command}`mas` to
successfully install and upgrade applications, and that unfortunately apps removed from this
option will not be uninstalled automatically even if
Expand Down Expand Up @@ -768,8 +765,7 @@ in
];

homebrew.brews =
optional (cfg.masApps != { }) "mas"
++ optional (cfg.whalebrews != [ ]) "whalebrew";
optional (cfg.whalebrews != [ ]) "whalebrew";

homebrew.brewfile =
"# Created by `nix-darwin`'s `homebrew` module\n\n"
Expand All @@ -789,7 +785,8 @@ in
# Homebrew Bundle
echo >&2 "Homebrew bundle..."
if [ -f "${cfg.brewPrefix}/brew" ]; then
PATH="${cfg.brewPrefix}":$PATH ${cfg.onActivation.brewBundleCmd}
PATH="${cfg.brewPrefix}:${lib.makeBinPath [ pkgs.mas ]}:$PATH" \
${cfg.onActivation.brewBundleCmd}
else
echo -e "\e[1;31merror: Homebrew is not installed, skipping...\e[0m" >&2
fi
Expand Down

0 comments on commit a36049d

Please sign in to comment.