You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flake package shipped only bin/mailerlite, so shells never got its completions, even though mailerlite completion <shell> exists.
postInstall runs mailerlite completion bash|fish|zsh and installs the output with installShellCompletion. installPhase now calls runHook preInstall/postInstall so the hook runs.
It is darwin only. The Linux release assets are *-unknown-linux-gnu binaries that this flake doesn't patch for Nix, so they can't run in the build sandbox. Linux packages are unchanged. Patching them (e.g. autoPatchelfHook) would be a separate change.
update-flake.yml only rewrites the version and sha256- hash lines, so releases are unaffected.
Checked: nix build on aarch64-darwin produces bash, fish and zsh completions, and the fish script passes fish -n. The x86_64-linux derivation still evaluates.
Installs bash, fish and zsh completions in the Nix flake on darwin
No findings
Confidence 5/5 · low risk: The change only affects the Nix build on darwin: it adds completion generation from the installed binary and leaves Linux packages unchanged. The process-substitution form matches the documented installShellFiles usage, and the author reports a successful aarch64-darwin build with bash, fish and zsh output. Risk rests on the build-only scope, since nothing runs at deploy time.
Summary
The flake's installPhase now calls runHook preInstall and runHook postInstall. On darwin, postInstall generates completions from the installed binary with installShellCompletion. Linux packages are unchanged, because those release binaries aren't patched for Nix and can't run in the build sandbox. The process-substitution form is the documented installShellFiles usage, and the darwin guard is explained in a comment. I found nothing to flag.
What's good
The darwin-only guard has a comment explaining why Linux is excluded, so Linux builds stay unchanged.
Adding the runHook preInstall and runHook postInstall calls makes the new hook actually run, and keeps any other hooks working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The flake package shipped only
bin/mailerlite, so shells never got its completions, even thoughmailerlite completion <shell>exists.postInstallrunsmailerlite completion bash|fish|zshand installs the output withinstallShellCompletion.installPhasenow callsrunHook preInstall/postInstallso the hook runs.*-unknown-linux-gnubinaries that this flake doesn't patch for Nix, so they can't run in the build sandbox. Linux packages are unchanged. Patching them (e.g.autoPatchelfHook) would be a separate change.update-flake.ymlonly rewrites theversionandsha256-hash lines, so releases are unaffected.Checked:
nix buildon aarch64-darwin produces bash, fish and zsh completions, and the fish script passesfish -n. The x86_64-linux derivation still evaluates.