modules/homebrew: replace brewPrefix with prefix
Closes #596 `homebrew.brewPrefix` defaulted to the bin directory (`/opt/homebrew/bin`), not the actual Homebrew prefix (`/opt/homebrew`). This misled users into writing `${config.homebrew.brewPrefix}/bin`, producing the broken path `/opt/homebrew/bin/bin`. Replace it with `homebrew.prefix`, which has correct semantics matching `brew --prefix`. The old `brewPrefix` option is removed using `mkRemovedOptionModule`, which catches both users who set the option and users who read it in custom code. A warning also fires if the new `prefix` value ends with `/bin`, catching users who copy the old value verbatim.
This commit is contained in:
parent
24531016d8
commit
8c29e146dd
2 changed files with 12 additions and 10 deletions
|
|
@ -252,7 +252,7 @@ let
|
|||
'';
|
||||
|
||||
homebrewInstalled = ''
|
||||
if [[ ! -f ${escapeShellArg config.homebrew.brewPrefix}/brew && -z "''${INSTALLING_HOMEBREW:-}" ]]; then
|
||||
if [[ ! -f ${escapeShellArg config.homebrew.prefix}/bin/brew && -z "''${INSTALLING_HOMEBREW:-}" ]]; then
|
||||
echo "[1;31merror: Using the homebrew module requires homebrew installed, aborting activation[0m" >&2
|
||||
echo "Homebrew doesn't seem to be installed. Please install homebrew separately." >&2
|
||||
echo "You can install homebrew using the following command:" >&2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue