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 = [
|
imports = [
|
||||||
(mkRenamedOptionModule [ "homebrew" "autoUpdate" ] [ "homebrew" "onActivation" "autoUpdate" ])
|
(mkRenamedOptionModule [ "homebrew" "autoUpdate" ] [ "homebrew" "onActivation" "autoUpdate" ])
|
||||||
(mkRenamedOptionModule [ "homebrew" "cleanup" ] [ "homebrew" "onActivation" "cleanup" ])
|
(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 = {
|
options.homebrew = {
|
||||||
enable = mkEnableOption ''
|
enable = mkEnableOption ''
|
||||||
{command}`nix-darwin` to manage installing/updating/upgrading Homebrew taps, formulae,
|
{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
|
casks, Mac App Store apps, Go packages, and Cargo crates using Homebrew Bundle.
|
||||||
Bundle.
|
|
||||||
|
|
||||||
Note that enabling this option does not install Homebrew, see the Homebrew
|
Note that enabling this option does not install Homebrew, see the Homebrew
|
||||||
[website](https://brew.sh) for installation instructions.
|
[website](https://brew.sh) for installation instructions.
|
||||||
|
|
||||||
Use the [](#opt-homebrew.brews), [](#opt-homebrew.casks),
|
Use the [](#opt-homebrew.brews), [](#opt-homebrew.casks),
|
||||||
[](#opt-homebrew.masApps), [](#opt-homebrew.goPackages),
|
[](#opt-homebrew.masApps), [](#opt-homebrew.goPackages),
|
||||||
[](#opt-homebrew.cargoPackages), [](#opt-homebrew.whalebrews), and
|
[](#opt-homebrew.cargoPackages), and [](#opt-homebrew.vscode) options to list the
|
||||||
[](#opt-homebrew.vscode) options to list the Homebrew formulae, casks, Mac App
|
Homebrew formulae, casks, Mac App Store apps, Go packages, Cargo crates, and
|
||||||
Store apps, Go packages, Cargo crates, Docker containers, and Visual Studio Code
|
Visual Studio Code extensions you'd like to install. Use the
|
||||||
extensions you'd like to install. Use the
|
|
||||||
[](#opt-homebrew.taps) option, to make additional formula repositories available to
|
[](#opt-homebrew.taps) option, to make additional formula repositories available to
|
||||||
Homebrew. This module uses those options (along with the
|
Homebrew. This module uses those options (along with the
|
||||||
[](#opt-homebrew.caskArgs) options) to generate a Brewfile that
|
[](#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 {
|
vscode = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
|
@ -834,6 +818,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
|
@ -868,9 +853,6 @@ in
|
||||||
"homebrew.enable"
|
"homebrew.enable"
|
||||||
];
|
];
|
||||||
|
|
||||||
homebrew.brews =
|
|
||||||
optional (cfg.whalebrews != [ ]) "whalebrew";
|
|
||||||
|
|
||||||
homebrew.brewfile =
|
homebrew.brewfile =
|
||||||
"# Created by `nix-darwin`'s `homebrew` module\n\n"
|
"# Created by `nix-darwin`'s `homebrew` module\n\n"
|
||||||
+ mkBrewfileSectionString "Taps" cfg.taps
|
+ mkBrewfileSectionString "Taps" cfg.taps
|
||||||
|
|
@ -882,7 +864,6 @@ in
|
||||||
(mapAttrsToList (n: id: ''mas "${n}", id: ${toString id}'') cfg.masApps)
|
(mapAttrsToList (n: id: ''mas "${n}", id: ${toString id}'') cfg.masApps)
|
||||||
+ mkBrewfileSectionString "Go packages" (map (v: ''go "${v}"'') cfg.goPackages)
|
+ mkBrewfileSectionString "Go packages" (map (v: ''go "${v}"'') cfg.goPackages)
|
||||||
+ mkBrewfileSectionString "Cargo packages" (map (v: ''cargo "${v}"'') cfg.cargoPackages)
|
+ 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)
|
+ mkBrewfileSectionString "Visual Studio Code extensions" (map (v: ''vscode "${v}"'') cfg.vscode)
|
||||||
+ optionalString (cfg.extraConfig != "") ("# Extra config\n" + cfg.extraConfig);
|
+ optionalString (cfg.extraConfig != "") ("# Extra config\n" + cfg.extraConfig);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,14 +85,11 @@ in
|
||||||
"ripgrep"
|
"ripgrep"
|
||||||
];
|
];
|
||||||
|
|
||||||
homebrew.whalebrews = [
|
|
||||||
"whalebrew/wget"
|
|
||||||
];
|
|
||||||
|
|
||||||
homebrew.vscode = [
|
homebrew.vscode = [
|
||||||
"golang.go"
|
"golang.go"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
test = ''
|
test = ''
|
||||||
bf=${lib.escapeShellArg config.homebrew.brewfile}
|
bf=${lib.escapeShellArg config.homebrew.brewfile}
|
||||||
|
|
||||||
|
|
@ -126,9 +123,6 @@ in
|
||||||
echo "checking cargo entries in Brewfile" >&2
|
echo "checking cargo entries in Brewfile" >&2
|
||||||
${mkTest "ripgrep" ''cargo "ripgrep"''}
|
${mkTest "ripgrep" ''cargo "ripgrep"''}
|
||||||
|
|
||||||
echo "checking whalebrew entries in Brewfile" >&2
|
|
||||||
${mkTest "whalebrew/wget" ''whalebrew "whalebrew/wget"''}
|
|
||||||
|
|
||||||
echo "checking vscode entries in Brewfile" >&2
|
echo "checking vscode entries in Brewfile" >&2
|
||||||
${mkTest "golang.go" ''vscode "golang.go"''}
|
${mkTest "golang.go" ''vscode "golang.go"''}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue