Skip to content

Commit a36049d

Browse files
authoredFeb 10, 2025
Merge pull request #1329 from emilazy/push-nlxwnqymuupk
homebrew: use `mas` from Nixpkgs
2 parents 0b6f96a + c31b6e8 commit a36049d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎modules/homebrew.nix

+3-6
Original file line numberDiff line numberDiff line change
@@ -708,9 +708,6 @@ in
708708
description = ''
709709
Applications to install from Mac App Store using {command}`mas`.
710710
711-
When this option is used, `"mas"` is automatically added to
712-
[](#opt-homebrew.brews).
713-
714711
Note that you need to be signed into the Mac App Store for {command}`mas` to
715712
successfully install and upgrade applications, and that unfortunately apps removed from this
716713
option will not be uninstalled automatically even if
@@ -768,8 +765,7 @@ in
768765
];
769766

770767
homebrew.brews =
771-
optional (cfg.masApps != { }) "mas"
772-
++ optional (cfg.whalebrews != [ ]) "whalebrew";
768+
optional (cfg.whalebrews != [ ]) "whalebrew";
773769

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

0 commit comments

Comments
 (0)