Merge pull request #130 from zhaofengli/brew-5.1.1

brew-src: 5.0.12 -> 5.1.1
This commit is contained in:
Zhaofeng Li
2026-03-28 13:51:07 -04:00
committed by GitHub
6 changed files with 63 additions and 46 deletions
Generated
+25 -25
View File
@@ -16,21 +16,21 @@
"type": "github"
}
},
"nix-darwin_25_05": {
"nix-darwin_25_11": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1749744770,
"narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=",
"lastModified": 1772129556,
"narHash": "sha256-Utk0zd8STPsUJPyjabhzPc5BpPodLTXrwkpXBHYnpeg=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb",
"rev": "ebec37af18215214173c98cf6356d0aca24a2585",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "nix-darwin-25.05",
"ref": "nix-darwin-25.11",
"repo": "nix-darwin",
"type": "github"
}
@@ -40,11 +40,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1751313918,
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
"lastModified": 1773000227,
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
"type": "github"
},
"original": {
@@ -75,27 +75,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1747953325,
"narHash": "sha256-y2ZtlIlNTuVJUZCqzZAhIw5rrKP4DOSklev6c8PyCkQ=",
"lastModified": 1764491476,
"narHash": "sha256-E4rtgPS7fntINb6fVJ5qQdkhfbZn8pzMYNdmiXqZmCo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "55d1f923c480dadce40f5231feb472e81b0bab48",
"rev": "54f09efd2ca0dd5bb9c5fafc89573ab3ac44701d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-25.05-darwin",
"ref": "nixpkgs-25.11-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747728033,
"narHash": "sha256-NnXFQu7g4LnvPIPfJmBuZF7LFy/fey2g2+LCzjQhTUk=",
"lastModified": 1765934234,
"narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2f9173bde1d3fbf1ad26ff6d52f952f9e9da52ea",
"rev": "af84f9d270d404c17699522fab95bbf928a2d92f",
"type": "github"
},
"original": {
@@ -105,29 +105,29 @@
"type": "github"
}
},
"nixpkgs_25_05": {
"nixpkgs_25_11": {
"locked": {
"lastModified": 1754028485,
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=",
"lastModified": 1774388614,
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "59e69648d345d6e8fef86158c555730fa12af9de",
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_unstable": {
"locked": {
"lastModified": 1753939845,
"narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=",
"lastModified": 1774386573,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "94def634a20494ee057c76998843c015909d6311",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github"
},
"original": {
@@ -140,10 +140,10 @@
"root": {
"inputs": {
"flake-compat": "flake-compat",
"nix-darwin_25_05": "nix-darwin_25_05",
"nix-darwin_25_11": "nix-darwin_25_11",
"nix-darwin_unstable": "nix-darwin_unstable",
"nix-github-actions": "nix-github-actions",
"nixpkgs_25_05": "nixpkgs_25_05",
"nixpkgs_25_11": "nixpkgs_25_11",
"nixpkgs_unstable": "nixpkgs_unstable"
}
}
+7 -7
View File
@@ -2,10 +2,10 @@
{
inputs = {
nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs_25_05.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs_25_11.url = "github:NixOS/nixpkgs/nixos-25.11";
nix-darwin_unstable.url = "github:nix-darwin/nix-darwin";
nix-darwin_25_05.url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
nix-darwin_25_11.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
nix-github-actions = {
url = "github:nix-community/nix-github-actions";
@@ -31,15 +31,15 @@
nixpkgs = inputs.nixpkgs_unstable;
nix-darwin = inputs.nix-darwin_unstable;
};
"25.05" = {
nixpkgs = inputs.nixpkgs_25_05;
nix-darwin = inputs.nix-darwin_25_05;
"25.11" = {
nixpkgs = inputs.nixpkgs_25_11;
nix-darwin = inputs.nix-darwin_25_11;
};
};
githubPlatforms = {
"aarch64-darwin" = "macos-15";
"x86_64-darwin" = "macos-15";
"aarch64-darwin" = "macos-26";
"x86_64-darwin" = "macos-26";
};
matrix =
Generated
+4 -4
View File
@@ -3,16 +3,16 @@
"brew-src": {
"flake": false,
"locked": {
"lastModified": 1769363988,
"narHash": "sha256-BiGPeulrDVetXP+tjxhMcGLUROZAtZIhU5m4MqawCfM=",
"lastModified": 1774235677,
"narHash": "sha256-0ryNYmzDAeRlrzPTAgmzGH/Cgc8iv/LBN6jWGUANvIk=",
"owner": "Homebrew",
"repo": "brew",
"rev": "d01011cac6d72032c75fd2cd9489909e95d9faf2",
"rev": "894a3d23ac0c8aaf561b9874b528b9cb2e839201",
"type": "github"
},
"original": {
"owner": "Homebrew",
"ref": "5.0.12",
"ref": "5.1.1",
"repo": "brew",
"type": "github"
}
+1 -1
View File
@@ -3,7 +3,7 @@
inputs = {
brew-src = {
url = "github:Homebrew/brew/5.0.12";
url = "github:Homebrew/brew/5.1.1";
flake = false;
};
};
+16 -6
View File
@@ -15,6 +15,10 @@ BIN_BREW_EXPORTED_VARS=(
HOMEBREW_USER_CONFIG_HOME
HOMEBREW_ORIGINAL_BREW_FILE
)
BIN_BREW_EXPORTED_VARS_REGEX="^($(
IFS='|'
echo "${BIN_BREW_EXPORTED_VARS[*]}"
))(=|$)"
# Load Homebrew's variable configuration files from disk.
export_homebrew_env_file() {
@@ -22,18 +26,20 @@ export_homebrew_env_file() {
env_file="${1}"
[[ -r "${env_file}" ]] || return 0
while read -r line
do
# only load variables defined in env_config.rb
[[ "${line}" =~ ^(HOMEBREW_|SUDO_ASKPASS=|(all|no|ftp|https?)_proxy=) ]] || continue
# forbid overriding variables that are set in this file
local invalid_variable
for VAR in "${BIN_BREW_EXPORTED_VARS[@]}"
do
[[ "${line}" = "${VAR}"* ]] && invalid_variable="${VAR}"
done
[[ -n "${invalid_variable:-}" ]] && continue
[[ "${line}" =~ ${BIN_BREW_EXPORTED_VARS_REGEX} ]] && continue
if [[ "${line}" == HOMEBREW_EXPERIMENTAL_RUST_FRONTEND=* ]]
then
echo "Warning: Ignoring HOMEBREW_EXPERIMENTAL_RUST_FRONTEND. This cannot be set in an env file." >&2
continue
fi
export "${line?}"
done <"${env_file}"
@@ -58,6 +64,9 @@ export_homebrew_env_file "${HOMEBREW_PREFIX}/etc/homebrew/brew.env"
if [[ -n "${XDG_CONFIG_HOME-}" ]]
then
HOMEBREW_USER_CONFIG_HOME="${XDG_CONFIG_HOME}/homebrew"
elif [[ -n "${HOMEBREW_XDG_CONFIG_HOME-}" ]]
then
HOMEBREW_USER_CONFIG_HOME="${HOMEBREW_XDG_CONFIG_HOME}/homebrew"
else
HOMEBREW_USER_CONFIG_HOME="${HOME}/.homebrew"
fi
@@ -119,6 +128,7 @@ USED_BY_HOMEBREW_VARS=(
VSCODE_IPC_HOOK_CLI
WSL_DISTRO_NAME
XDG_CACHE_HOME
XDG_CONFIG_HOME
XDG_DATA_DIRS
XDG_RUNTIME_DIR
ZDOTDIR
+10 -3
View File
@@ -35,7 +35,7 @@ let
tools = pkgs.callPackage ../pkgs { };
brew = if cfg.patchBrew then patchBrew cfg.package else cfg.package;
ruby = pkgs.ruby_3_4;
ruby = pkgs.ruby_4_0;
# Sadly, we cannot replace coreutils since the GNU implementations
# behave differently.
@@ -305,10 +305,17 @@ let
--replace-fail 'for DIR in "''${HOMEBREW_REPOSITORY}"' "for DIR in "
# Disable vendored Ruby
#
# Homebrew passes --disable=gems,rubyopt ($HOMEBREW_RUBY_DISABLE_OPTIONS)
# and inserts vendored libraries into LOAD_PATH (vendor/bundle/bundler/setup.rb, standalone/init.rb).
# Instead of re-enabling gems, we add in additional required gems into LOAD_PATH.
ruby_sh="$out/Library/Homebrew/utils/ruby.sh"
if [[ -e "$ruby_sh" ]] && grep "setup-ruby-path" "$ruby_sh"; then
chmod u+w "$ruby_sh"
bundler_setup_rb="$out/Library/Homebrew/vendor/bundle/bundler/setup.rb"
if [[ -e "$ruby_sh" ]] && grep "setup-ruby-path" "$ruby_sh" >/dev/null; then
>&2 echo "Patching vendored Ruby..."
chmod u+w "$ruby_sh" "$bundler_setup_rb"
echo -e "setup-ruby-path() { export HOMEBREW_RUBY_PATH=\"${ruby}/bin/ruby\"; }" >>"$ruby_sh"
echo -e "$:.unshift \"${ruby.gems.fiddle}/${ruby.gemPath}/gems/fiddle-${ruby.gems.fiddle.version}/lib\"" >>"$bundler_setup_rb"
fi
'' + lib.optionalString (brew ? version) ''
# Embed version number instead of checking with git