8000 brew-src: 4.2.16 -> 4.3.1 by zhaofengli · Pull Request #23 · zhaofengli/nix-homebrew · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

brew-src: 4.2.16 -> 4.3.1 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/activate-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ systemProfile=$(nix build "./${DIR}/..#darwinConfigurations.ci.${example}.system

>&2 echo "Built $systemProfile"

sudo rm "/etc/nix/nix.conf"
sudo "$systemProfile/activate"
"$systemProfile/activate-user"

Expand Down
26 changes: 13 additions & 13 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
nix-darwin.url = "github:LnL7/nix-darwin";
flake-utils.url = "github:numtide/flake-utils";
brew-src = {
url = "github:Homebrew/brew/4.2.16";
url = "github:Homebrew/brew/4.3.1";
flake = false;
};
};
Expand Down
1 change: 1 addition & 0 deletions modules/brew.tail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ MANPAGE_VARS=(
BAT_CONFIG_PATH
BAT_THEME
BROWSER
BUNDLE_USER_CACHE
DISPLAY
EDITOR
NO_COLOR
Expand Down
10 changes: 6 additions & 4 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ let
tools = pkgs.callPackage ../pkgs { };

brew = if cfg.patchBrew then patchBrew cfg.package else cfg.package;
ruby = pkgs.ruby_3_3;

# Sadly, we cannot replace coreutils since the GNU implementations
# behave differently.
Expand Down Expand Up @@ -285,9 +286,7 @@ let
/bin/ln -shf "${env}" "$HOMEBREW_LIBRARY/Taps"
'';

patchBrew = brew: let
pinnedRuby = "${pkgs.ruby}/bin/ruby";
in pkgs.runCommandLocal "${brew.name or "brew"}-patched" {} (''
patchBrew = brew: pkgs.runCommandLocal "${brew.name or "brew"}-patched" {} (''
cp -r "${brew}" "$out"
chmod u+w "$out" "$out/Library/Homebrew/cmd"

Expand All @@ -299,13 +298,16 @@ let
ruby_sh="$out/Library/Homebrew/utils/ruby.sh"
if [[ -e "$ruby_sh" ]] && grep "setup-ruby-path" "$ruby_sh"; then
chmod u+w "$ruby_sh"
echo -e "setup-ruby-path() { export HOMEBREW_RUBY_PATH=\"${pinnedRuby}\"; }" >>"$ruby_sh"
echo -e "setup-ruby-path() { export HOMEBREW_RUBY_PATH=\"${ruby}/bin/ruby\"; }" >>"$ruby_sh"
fi
'' + lib.optionalString (brew ? version) ''
# Embed version number instead of checking with git
brew_sh="$out/Library/Homebrew/brew.sh"
chmod u+w "$out/Library/Homebrew" "$brew_sh"
sed -i -e 's/^HOMEBREW_VERSION=.*/HOMEBREW_VERSION="${brew.version}"/g' "$brew_sh"

# 4.3.1: Clear GIT_REVISION to bypass caching mechanism
sed -i -e 's/^GIT_REVISION=.*/GIT_REVISION=""; HOMEBREW_VERSION="${brew.version}"/g' "$brew_sh"
'');
in {
options = {
Expand Down
Loading
0