modules/homebrew: remove homebrew.whalebrews option
Whalebrew support was fully removed from Homebrew Bundle in Homebrew 4.7.0 (Nov 2025). A `whalebrew` entry in a Brewfile now raises `RuntimeError: Invalid Brewfile: undefined method 'whalebrew'`, breaking the entire `brew bundle` invocation. Use `mkRemovedOptionModule` so that existing configs get a clear warning instead of an undefined-option error. Also removes the auto-addition of `"whalebrew"` to `homebrew.brews` and the Brewfile generation for Docker containers.
This commit is contained in:
parent
3479b795aa
commit
65cfcebaa2
2 changed files with 7 additions and 32 deletions
|
|
@ -557,23 +557,22 @@ in
|
|||
imports = [
|
||||
(mkRenamedOptionModule [ "homebrew" "autoUpdate" ] [ "homebrew" "onActivation" "autoUpdate" ])
|
||||
(mkRenamedOptionModule [ "homebrew" "cleanup" ] [ "homebrew" "onActivation" "cleanup" ])
|
||||
(mkRemovedOptionModule [ "homebrew" "whalebrews" ] "Whalebrew support was removed from Homebrew Bundle in Homebrew 4.7.0 (Nov 2025). `whalebrew` entries in a Brewfile now cause `brew bundle` to fail. Please manage Whalebrew images directly using the `whalebrew` CLI.")
|
||||
];
|
||||
|
||||
options.homebrew = {
|
||||
enable = mkEnableOption ''
|
||||
{command}`nix-darwin` to manage installing/updating/upgrading Homebrew taps, formulae,
|
||||
casks, Mac App Store apps, Go packages, Cargo crates, and Docker containers, using Homebrew
|
||||
Bundle.
|
||||
casks, Mac App Store apps, Go packages, and Cargo crates using Homebrew Bundle.
|
||||
|
||||
Note that enabling this option does not install Homebrew, see the Homebrew
|
||||
[website](https://brew.sh) for installation instructions.
|
||||
|
||||
Use the [](#opt-homebrew.brews), [](#opt-homebrew.casks),
|
||||
[](#opt-homebrew.masApps), [](#opt-homebrew.goPackages),
|
||||
[](#opt-homebrew.cargoPackages), [](#opt-homebrew.whalebrews), and
|
||||
[](#opt-homebrew.vscode) options to list the Homebrew formulae, casks, Mac App
|
||||
Store apps, Go packages, Cargo crates, Docker containers, and Visual Studio Code
|
||||
extensions you'd like to install. Use the
|
||||
[](#opt-homebrew.cargoPackages), and [](#opt-homebrew.vscode) options to list the
|
||||
Homebrew formulae, casks, Mac App Store apps, Go packages, Cargo crates, and
|
||||
Visual Studio Code extensions you'd like to install. Use the
|
||||
[](#opt-homebrew.taps) option, to make additional formula repositories available to
|
||||
Homebrew. This module uses those options (along with the
|
||||
[](#opt-homebrew.caskArgs) options) to generate a Brewfile that
|
||||
|
|
@ -803,21 +802,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
whalebrews = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
example = [ "whalebrew/wget" ];
|
||||
description = ''
|
||||
List of Docker images to install using {command}`whalebrew`.
|
||||
|
||||
When this option is used, `"whalebrew"` is automatically added to
|
||||
[](#opt-homebrew.brews).
|
||||
|
||||
For more information on {command}`whalebrew` see:
|
||||
[github.com/whalebrew/whalebrew](https://github.com/whalebrew/whalebrew).
|
||||
'';
|
||||
};
|
||||
|
||||
vscode = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
|
|
@ -834,6 +818,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
|
|
@ -868,9 +853,6 @@ in
|
|||
"homebrew.enable"
|
||||
];
|
||||
|
||||
homebrew.brews =
|
||||
optional (cfg.whalebrews != [ ]) "whalebrew";
|
||||
|
||||
homebrew.brewfile =
|
||||
"# Created by `nix-darwin`'s `homebrew` module\n\n"
|
||||
+ mkBrewfileSectionString "Taps" cfg.taps
|
||||
|
|
@ -882,7 +864,6 @@ in
|
|||
(mapAttrsToList (n: id: ''mas "${n}", id: ${toString id}'') cfg.masApps)
|
||||
+ mkBrewfileSectionString "Go packages" (map (v: ''go "${v}"'') cfg.goPackages)
|
||||
+ mkBrewfileSectionString "Cargo packages" (map (v: ''cargo "${v}"'') cfg.cargoPackages)
|
||||
+ mkBrewfileSectionString "Docker containers" (map (v: ''whalebrew "${v}"'') cfg.whalebrews)
|
||||
+ mkBrewfileSectionString "Visual Studio Code extensions" (map (v: ''vscode "${v}"'') cfg.vscode)
|
||||
+ optionalString (cfg.extraConfig != "") ("# Extra config\n" + cfg.extraConfig);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue