Open Cu3PO42 opened 1 year ago
I started looking into this, but have not been able to pinpoint the issue. Here's what I know:
initialize_prefix
fails to set the correct ownership on /usr/local/bin
initialize_prefix
does not fix the issue/usr/local/bin
is added to chowns[@]
.chown
, chgrp
, ...) with echo <utility>
the necessary commands to change /usr/local/bin
's ownership are printed. Manually running them has the desired effect.I currently cannot explain the inconsisties I've observed.
Thanks for looking into this! Right now I have a serviceable hot fix for this: I added
system.activationScripts.extraUserActivation.text = lib.mkOrder 1501 (lib.concatStringsSep "\n" (lib.mapAttrsToList (prefix: d: if d.enable then ''
sudo chown -R ${config.nix-homebrew.user} ${prefix}/bin
sudo chgrp -R ${config.nix-homebrew.group} ${prefix}/bin
'' else "") config.nix-homebrew.prefixes));
to my config, which allows the installation to proceed successfully.
I've installed Homebrew on a fresh macOS x64 VM. Installing a formulae immediately fails because
/usr/local/bin
is not writeable by my user. Indeed, it is owned by root, even though most other files in in/usr/local
are owned bymyuser:admin
. Thebin
andHomebrew
folders, however are owned byroot:wheel
.I could fix this by inserting an appropriate
chown
in the setup script, but I'm not 100% sure if that is just a band-aid without fixing the underlying root cause.Unfortunately I don't currently have access to an aarch64 Mac to test the behaviour there.